Please help with a probability formula

In summary, the conversation discusses a dice game and the user's request for help in creating a formula to calculate the probability of a certain result based on the number of red and blue dice and the minimum number of successful dice. A possible formula is provided, but it is complex and may be difficult to use in Excel.
  • #1
brebh
3
0
Hi!

I'm not very good with statistics and such but have been working on a problem for a month now and have finally gotten to a point where I'm ready to ask for help. I didn't really know where to go but found this forum and thought I'd give it a try here. =)

I'm working on a dice game and am looking to create a formula that I can use to plug in a few variables and have a probability of a certain result kicked back to me. Here's what I've got so far:

r = number of red dice in a single throw of all dice
b = number of blue dice in a single throw of all dice
pr = probability of "scoring a point" with a red die (1/6)
pb = probability of "scoring a point" with a blue die (3/6)
n = the minimum number of "points" desired in a single throw of all dice

To put some numbers to a sample situation... I've got 2 red dice and 1 blue die in a throw. I want to know the odds of at least 2 of the dice in the throw "scoring" (it's ok if all the dice are successful).

Rather than embarrass myself by showing you guys a formula that I know is clearly wrong, I will say that I think the result of the example I've provided should be 16.67%. I'm pretty sure that's accurate because I wrote out every combination and 36 of the 216 possible results score twice on 2 of the 3 dice.

Thanks in advance for any help and I apologize for being such a noob.
 
Physics news on Phys.org
  • #2
A quicker way to calculate this
If 2 out of the 3 dice score, then:

Either 2 red dice scored, and the blue die didn't score: chance of this occurring is (1/6)2*1/2 (multiply the independent probabilities of each die doing what it does)

2 red dice score, and the blue die scores: (1/6)2*1/2

1 red die scores, the blue die scores

1/6*5/6*1/2*2 - multiply by 2 because there are two ways you can pick which red die scores

Add these up to get: 1/6 as you said

The principle is you break it up into disjoint cases (so no two cases occur at the same time), calculate the probability of each case occurring, then add them up at the end. Notice if your cases overlap, then you're essentially double counting the events that occur under both cases
 
  • #3
Thanks!

That helps for sure.

Just wondering though, is it possible to build a formula that allows me to plug in any number of red dice (r), blue dice (b) and the minimum number of dice that score in a result (n) to get the probability of different situations?

Thanks again!
 
  • #4
[tex]\sum_{x=0}^r\sum_{y=n-a}^b\binom rx\binom byp_r^xp_b^y(1-p_r)^{r-x}(1-p_b)^{b-y}=\sum_{x=0}^r\left(\binom rxp_r^x(1-p_r)^{r-x}\sum_{y=n-a}^b\binom byp_b^y(1-p_b)^{b-y}\right)[/tex]

which with your probabilities is

[tex]\frac{1}{2^b6^r}\sum_{x=0}^r\left(\binom rx5^{r-x}\sum_{y=n-a}^b\binom by\right)[/tex]

I'm sure this can be simplified further, but it's still going to be pretty ugly.

Edit: Mathematica can get it to a single sum, but it's hideous and probably harder to calculate for any values you'd care about:
[tex]\frac{1}{2^b6^r}\sum_{x=0}^r\left(\frac{5^{r-x}b!\,_2\!\tilde{\text{F}}_1(1,n-b-x; n-x+1; -1)}{(a+b-n)!}\right)[/tex]

Edit 2: If you Google for and install Pari/GP, this will do it for you:
Code:
brebh(r,b,n)=sum(x=0,r,binomial(r,x)*5^(r-x)*sum(y=n-x,b,binomial(b,y)))/2^b/6^r
(15:32)brebh(2,1,2)
time = 0 ms.
%46 = 1/6
 
Last edited:
  • #5
Holy crap!

I would have never figured that out. Thanks for the solution!

Now I need to start working on converting that into something excel can read. =)

Thanks again!
 
  • #6
If you want to do this in Excel you'll either need to use a macro or to make a b by r grid and a calculation row beside it.
 

1. What is a probability formula?

A probability formula is a mathematical equation used to calculate the likelihood of a particular event or outcome occurring. It takes into account the number of desired outcomes and the total number of possible outcomes to determine the probability of the event happening.

2. How do I use a probability formula?

To use a probability formula, you need to identify the number of desired outcomes and the total number of possible outcomes. Then, plug these numbers into the formula and solve for the probability. It is important to make sure that the outcomes are mutually exclusive and collectively exhaustive.

3. What is the difference between theoretical and experimental probability?

Theoretical probability is based on mathematical calculations using a probability formula, while experimental probability is based on actual observations and data collected from experiments or real-life events. Theoretical probability is used to predict outcomes, while experimental probability is used to analyze and interpret data.

4. Can a probability formula be applied to any situation?

In theory, a probability formula can be applied to any situation as long as the outcomes are mutually exclusive and collectively exhaustive. However, it may become more complex and difficult to calculate probabilities in situations with multiple variables and unknown factors.

5. Is there a specific probability formula for every type of problem?

No, there is not a specific probability formula for every type of problem. However, there are different types of probability formulas, such as binomial, geometric, and normal, that are used for specific types of problems. It is important to choose the appropriate formula based on the given situation.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
16
Views
2K
  • Set Theory, Logic, Probability, Statistics
2
Replies
41
Views
3K
  • Set Theory, Logic, Probability, Statistics
Replies
10
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
5
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
980
Replies
8
Views
4K
  • Set Theory, Logic, Probability, Statistics
Replies
8
Views
2K
Back
Top