vika
vika
  • Threads: 1
  • Posts: 1
Joined: Mar 7, 2014
March 7th, 2014 at 12:57:54 AM permalink
Hi,

My question is this:
Assuming I have an event occurring with probability p1, and that I make enough trials (N) to ensure with probability >p2 that at least one event will occur. What is the expected number of events among the N ?

cheers,
vika
mustangsally
mustangsally
  • Threads: 25
  • Posts: 2463
Joined: Mar 29, 2011
March 9th, 2014 at 5:32:05 PM permalink
Quote: vika

Hi,

My question is this:
Assuming I have an event occurring with probability p1,

Hi
vika, cool name. are you from Sweden? love to go there. I know one Vika and she plays the violin wonderfully.
OK, your question is interesting as to where it may lead to in the future.

The event I use is to draw a red marble from a bag of marbles and no looking
the bag has 10 marbles that are all the same size and weight but 5 are red and 5 are black.
sampling with replacement , so after each draw I return that marble back into the bag.
(one could also flip a fair coin too)
instead of something like drawing an Ace from a shuffled deck of 52 cards and not replacing the drawn card(s) before drawing another card = sampling without replacement

so, p1 = 0.50
Quote: vika

and that I make enough trials (N) to ensure with probability >p2 that at least one event will occur.

this is interesting too and must have something to do with an upcoming betting system. am I close?

The probability of "no event occurring" would be (1-p1)^N
How about N=10 draws from my bag of marbles
so 1 - (1-p1)^N = Prob at least one success (99.9023%)

but let us say you want p2 to be 99.9% (0.999)
instead of making a table of calculations to see where N is close
use this formula that solves now for N at the p2 value

N=LOG(1-p2)/LOG(1-p1)
many calculators have the LOG function
a little algebra gets us to this formula from the last one above (1 - (1-p1)^N)

how about we want p2 to be 95%
N=LOG(1-0.95)/LOG(1-0.5) = 4.32
try it
but N can not be 4.32
either 4 or 5
we will use (1 - (1-p1)^N) to see the values
4: 93.7500%
5: 96.8750%

so we use 5 (rounded up) because we wanted at least 95%

Quote: vika

What is the expected number of events among the N ?
cheers,
vika

for >p2 in the above example N=5
so 5 * p1 = 2.5 is the expected value or the expected number of events among the N

of course with just 5 draws we can easily calculate the exact distribution
because the 2.5 is an average and hard to get 2.5 red marbles in just 5 coin flips

did this at all help or did I answer a different question?
I had fun
Sally
I Heart Vi Hart
CrapsGenious
CrapsGenious
  • Threads: 33
  • Posts: 408
Joined: Dec 24, 2013
March 9th, 2014 at 9:06:34 PM permalink
Quote: mustangsally

Hi
vika, cool name. are you from Sweden? love to go there. I know one Vika and she plays the violin wonderfully.
OK, your question is interesting as to where it may lead to in the future.

The event I use is to draw a red marble from a bag of marbles and no looking
the bag has 10 marbles that are all the same size and weight but 5 are red and 5 are black.
sampling with replacement , so after each draw I return that marble back into the bag.
(one could also flip a fair coin too)
instead of something like drawing an Ace from a shuffled deck of 52 cards and not replacing the drawn card(s) before drawing another card = sampling without replacement

so, p1 = 0.50
this is interesting too and must have something to do with an upcoming betting system. am I close?

The probability of "no event occurring" would be (1-p1)^N
How about N=10 draws from my bag of marbles
so 1 - (1-p1)^N = Prob at least one success (99.9023%)

but let us say you want p2 to be 99.9% (0.999)
instead of making a table of calculations to see where N is close
use this formula that solves now for N at the p2 value

N=LOG(1-p2)/LOG(1-p1)
many calculators have the LOG function
a little algebra gets us to this formula from the last one above (1 - (1-p1)^N)

how about we want p2 to be 95%
N=LOG(1-0.95)/LOG(1-0.5) = 4.32
try it
but N can not be 4.32
either 4 or 5
we will use (1 - (1-p1)^N) to see the values
4: 93.7500%
5: 96.8750%

so we use 5 (rounded up) because we wanted at least 95%

for >p2 in the above example N=5
so 5 * p1 = 2.5 is the expected value or the expected number of events among the N

of course with just 5 draws we can easily calculate the exact distribution
because the 2.5 is an average and hard to get 2.5 red marbles in just 5 coin flips

did this at all help or did I answer a different question?
I had fun
Sally



You are "Genius" sally.
8 more years till retirement.
  • Jump to: