# Attempting to find an equation, not sure how to present it.

1. Sep 29, 2008

### ultimablah

Hey, all! I haven't been here for a long time, but I've got a problem I'm working on, and I'm not quite sure how to present my equation.

My problem is, for any given random event P with 1/D chance of occurring, what is the probability L, given T attempts, of event P occurring at least once?

The probability of P occurring when T is one is obvious, just 1/D, but past that, it seems to get rather complicated.

For D = 2, 3, and 4, the chances are charted below:

Code (Text):

D=2
T | L
1 | 1/2
2 | 3/4
3 | 7/8
4 | 15/16
5 | 31/32

D = 3
T | L
1 | 1/3
2 | 5/9
3 | 19/27
4 | 65/81
5 | 211/243

D = 4
T | L
1 | 1/4
2 | 7/16
3 | 37/64
4 | 175/256
5 | 781/1024

Now, I've figured an equation which works for solving for any L in terms of T, but the problem is that it requires the numerator of the previous L, and I don't want to have to get to T = 5 by solving 4, 3, 2, and 1 each time. I'd like an equation that solves for L given only T and D. What's it called if my equation requires a previous result to determine the next result?

I think I put the equation down correctly, please tell me it makes sense.

$$L(T) = \frac{N_T}{D_T} = \frac{(D-1)*(N_{T-1})+D^{T-1}}{D^{T}}$$
Did I explain everything all right?

Last edited by a moderator: Sep 29, 2008
2. Sep 29, 2008

### CRGreathouse

Probability P occurs (1 try): 1/D
Probability P does not occur (1 try): 1 - 1/D
Probability P does not occur (T tries): (1 - 1/D)^T
Probability P occurs at least once (T tries): 1 - (1 - 1/D)^T

3. Oct 1, 2008

### ultimablah

Thank you, but now I have another problem.

Let's say we had five marbles, 2 green and 3 red.

What are the chances, if you draw two marbles without replacing any, of getting at least one green?

That equation wouldn't work here, because N/D changes/

4. Oct 1, 2008

### CRGreathouse

Try working out some small examples. The formula should make itself obvious.

You'll probably use the factorial in the formula.

5. Oct 1, 2008

### HallsofIvy

Use the same logic as CRGreathouse showed you for the first problem: the probability of getting "at least one green" is 1- the probability of getting no green- i.e. the probability of getting two red.

Initially there are 2 green and 3 red: 5 altogether so the probability of getting RED is __

Assuming red is drawn (which you must in order to get "2 red") there are 2 green and 2 red left: 4 altogether, so the probability of getting RED is ____.

The probability of getting both red is the product of those two.

The probability of getting "at least one green" is 1 minus that.