0

# How to prove the probability with code?

Suppose one couple have two children. Question: under the circumstance of one of their children being a girl, what is the probability of another being a girl too?? There’re two most likely answer: 1/2 and 1/3 Our teacher has told us that the answer is 1/3, a little confusing right? How to prove that ?

17th Aug 2018, 4:25 AM

8 Respuestas
+ 1

17th Aug 2018, 5:02 AM
Ketan Lalcheta
+ 1

17th Aug 2018, 5:28 AM
Ketan Lalcheta
0
That maybe right, but how about this: since the sexes are independent event, right? How can they influence each other? Besides, all I want is proof with code , not logical answer
17th Aug 2018, 5:23 AM

0
Sorry maybe I should post my code at the beginning. Unfortunately,my code just never get the right 1/3 answer https://code.sololearn.com/cI4b93AkIA75/?ref=app
17th Aug 2018, 6:05 AM

0
Ketan Lalcheta...don’t know how to @
17th Aug 2018, 6:30 AM

0

17th Aug 2018, 6:46 AM
Ketan Lalcheta
0
Ketan Lalcheta but you code ends up with 25%, That’s not what we want
17th Aug 2018, 6:50 AM

0

17th Aug 2018, 7:01 AM
Ketan Lalcheta
En tendencia hoy
Be honest