There is a question of statistics I am facing and I solved the first part, but the second part wants to determine the distribution function of X and draw its graph. What the function would be?
In a small hotel, there are three rooms: one of them is a first-class apartment and the two other are second-class apartments. The probability that the first-class apartment is booked is 30%. The probability that any second-class apartment is booked is 80%. Random variable X represents the number of booked rooms.
determine the distribution function of X and draw its graph
Hint
$X$ can only take $4$ values: either $0$, $1$, $2$ or $3$ rooms are booked.
You need to find $p(X=i)$ for $i \in \{0, \dots, 3\}$.
Let's compute some values, you'll do the other ones.
$p(X=0)$: none of the room is booked! Probability that 1st class is not booked: $1-0.3 = 0.7$. Probability that none of 2nd class rooms are booked: $(1-0.8)^2 =0.04$. Therefore $P(X=0) = 0.7 \times 0.04 = 0.028$.
$P(X=1)$: either the 1st class room is booked and none of the 2nd class one. Or one of the 2nd class only. $P(X=1) = .3 \times (1 - 0.8)^2 + 2 \times (1-0.7) \times 0.8=0.492$
You need to find $P(X=2)$ and P$(X=3)$!