App that counts probabilities in c++

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
5 replies · 2K views
Hepic
Messages
118
Reaction score
0
Hey,I am making an app that counts probabilities in c++(win32){for those who knows}.
I have found three formulas of equation,but I need some help for one.

For example we have a die,and we hit it 6 times.
Can we count with an formula,the probabilities to have the number "5",three times exactly?(no less,no more)

Thanks!
 
Physics news on Phys.org
Can you explain more because I hear about that first time?

Or you could send me a tutorial??
 
Yea,I found an interesting site called "Math is fun",and I undestood it,but how I can count probabilities with that?
 
Hepic said:
Yea,I found an interesting site called "Math is fun",and I undestood it,but how I can count probabilities with that?

For the example in your original post:

You cast the die six times, so there are ##6^6## equally likely sequences of results. Because they are equally likely, the probability of getting any given sequence is one in ##6^6##. How many of these sequences include exactly three fives?