A country has a ratio between male and female births of 1.05 which means that 51.22 % of babies born are male.
(a) What is the probability for a mother that the first girl is born during the first three births?
(b) What is the probability of getting 2 girls among 4 babies?
The probability of getting a girl is p = 1 − 0.5122 = 0.4878.
(a) We are dealing with a geometric distribution here. Since we are interested in P(X ≤ 3), we can calculate:
P(X = 1) = 0.4878
P(X = 2) = 0.4878(1 − 0.4878) = 0.2498512
P(X = 3) = 0.4878(1 − 0.4878)² = 0.1279738
P(X ≤ 3) = P(X = 1) + P(X = 2) + P(X = 3) = 0.865625.
We would have obtained the same result in R using:
pgeom(2,0.4878) |
Note that we have to specify “2” rather than “3” for x because R takes the number of unsuccessful trials rather the number of trials until success.
(b) Here we deal with a binomial distribution with k = 2 and n = 4.We can calculate P(X = 2) as follows:
P(X = k) = \left(\begin{matrix} n \\ k \end{matrix} \right) p^{k}\left(1-p\right) ^{n-k}
= \left(\begin{matrix} 4 \\ 2 \end{matrix} \right) 0.4878² · (1 − 0.4878)² = 0.3745536.
R would have given us the same result using the dbinom(2,4,0.4878) command.