App that counts probabilities in c++

In summary, the conversation is about using the binomial theorem to calculate probabilities in a C++ app. The speaker is seeking help in understanding how to use the binomial distribution to calculate probabilities for a specific example involving rolling a die. They mention finding a helpful website, "Math is fun," but still have questions about how to apply the concept to their app.
  • #1
Hepic
118
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!
 
Technology news on Phys.org
  • #2
Use the binomial theorem.
k out of n with probability p of success on one roll (q=1-p), is pkq(n-k)n!/{k!(n-k)!}.
Your example: n = 6, k = 3, p = 1/6.
 
  • #3
Can you explain more because I hear about that first time?

Or you could send me a tutorial??
 
  • #5
Yea,I found an intersting site called "Math is fun",and I undestood it,but how I can count probabilities with that?
 
  • #6
Hepic said:
Yea,I found an intersting 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?
 

What is an "App that counts probabilities in c++"?

An "App that counts probabilities in c++" is a computer program that uses the programming language C++ to calculate the likelihood of certain events occurring.

What are the benefits of using an "App that counts probabilities in c++"?

Using an "App that counts probabilities in c++" can help scientists and researchers make more accurate predictions and decisions based on statistical data. It can also save time and effort compared to manual calculations.

How do I use an "App that counts probabilities in c++"?

To use an "App that counts probabilities in c++", you would need to input relevant data and parameters, such as the sample size and event probabilities. The program will then perform calculations and provide the results.

Are there any limitations to using an "App that counts probabilities in c++"?

Like any computer program, an "App that counts probabilities in c++" is only as accurate as the data and parameters that it is given. It is also important to understand the underlying mathematical concepts and assumptions used in the program.

Can I customize an "App that counts probabilities in c++" for my specific needs?

Some "Apps that counts probabilities in c++" may have customizable features, but it ultimately depends on the specific program and its capabilities. It is important to carefully review the program's documentation and instructions to determine if it can meet your specific needs.

Similar threads

  • Programming and Computer Science
Replies
3
Views
643
  • Programming and Computer Science
Replies
10
Views
2K
  • Computing and Technology
Replies
3
Views
973
  • Programming and Computer Science
Replies
3
Views
1K
  • Programming and Computer Science
Replies
6
Views
1K
  • Programming and Computer Science
Replies
27
Views
2K
  • Programming and Computer Science
Replies
4
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
16
Views
1K
  • Programming and Computer Science
Replies
5
Views
2K
  • Programming and Computer Science
Replies
1
Views
1K
Back
Top