In the study of investment problem, aside from the investment risk the background risk appears. Both the investment risk and the background risk are probabilistically described by random variables. This paper starts from the hypothesis that the two types of risk can be represented both probabilistically (by random variables) and possibilistically (by fuzzy numbers). We will study three models in which the investment risk and the background risk can be: fuzzy numbers, a random variabl-a fuzzy number and a fuzzy number-a random variable. A portfolio problem is formulated for each model and an approximate calculation formula of the optimal solution is proved.