0
How can i solve this heads and tails program with probability?
Good day sir/ma'am, so i have this problem or rather logic to solve. It's heads and tails program that also display it's probability on 2d array. For better understanding this is the brief equation of what i said: Probability of getting tails H H H T T H T T 0 TAILS = 1/4 1 TAILS = 2/4 2 TAILS = 1/4 So my question is is it possible to use .equals() to chech if 1 row, one by one have the same value or identical to each other and if they are they will add to these 0 TAILS = */4
1 Réponse
0
Assuming I'm understanding your question right, your premise is wrong.
The probability of flipping a coin and getting a particular value is 1/2. The probability of flipping any number of coins and getting a particular series of values is 1/2 times the number of coins. So, for any two coins the probability would be 1/4.