所以我通常直接引用人地嘅solution
因為我寫得唔夠好令你唔明
除咗以下網頁的outcome2
https://towardsdatascience.com/conditional-probability-with-python-concepts-tables-code-c23ffe65d110
仲有另一個
It is given that a family of 2 children has a girl, what is the probability that the other child is also a girl?
Given: Family of2 children with one being a girl.
To find: the probability that the other child is also a girl
Sol: All the possible outcomes for the combination are BG,GB,GG, n(S)=3
Only one favourable outcome for both children to be a girl
Hence the probability that the other child is also a girl is
=1/3