- My Forums
- Tiger Rant
- LSU Recruiting
- SEC Rant
- Saints Talk
- Pelicans Talk
- More Sports Board
- Fantasy Sports
- Golf Board
- Soccer Board
- O-T Lounge
- Tech Board
- Home/Garden Board
- Outdoor Board
- Health/Fitness Board
- Movie/TV Board
- Book Board
- Music Board
- Political Talk
- Money Talk
- Fark Board
- Gaming Board
- Travel Board
- Food/Drink Board
- Ticket Exchange
- TD Help Board
Customize My Forums- View All Forums
- Show Left Links
- Topic Sort Options
- Trending Topics
- Recent Topics
- Active Topics
Started By
Message
Probability question, help
Posted on 11/13/14 at 10:19 am
Posted on 11/13/14 at 10:19 am
Coffee must not have kicked in yet.
Need help on how to solve the below problem. If, someone wouldn't mind showing me how to solve, I'd greatly appreciate it.
Here's where I'm at. I've run the simulation in Excel 10k times. However, I don't know the =IF statement that can find 4 "Heads" in a row. Each game is per row and each flip is per column. What if statement can I use to find 4 heads in a row? After that, I'll know how to find the percentage.
TIA
Mashed Potatoes for your troubles.
Need help on how to solve the below problem. If, someone wouldn't mind showing me how to solve, I'd greatly appreciate it.
quote:
You are going to play a game where you bet a dollar and get to flip a coin ten times. If you get four heads in a row, you win. If you make the tenth flip without getting four heads in a row, you lose. Run this game ten thousand times. Approximately what is the probability that you will win?
Here's where I'm at. I've run the simulation in Excel 10k times. However, I don't know the =IF statement that can find 4 "Heads" in a row. Each game is per row and each flip is per column. What if statement can I use to find 4 heads in a row? After that, I'll know how to find the percentage.
TIA
Mashed Potatoes for your troubles.
Posted on 11/13/14 at 10:22 am to TigerDik86
Always bet cause it's fun and worst case you only lose a dollar.
Posted on 11/13/14 at 10:23 am to TigerDik86
quote:
Run this game ten thousand times
quote:
Approximately what is the probability that you will win?
Do you just have to win one out of 10K times?
That would easily be ~100%
Posted on 11/13/14 at 10:24 am to Powerman
quote:
Do you just have to win one out of 10K times?
That would easily be ~100%
Uh, no it wouldn't.
Posted on 11/13/14 at 10:25 am to TigerDik86
I'm a bit rusty on probability...not sure that the problem will be found using a simple excel formula.
But this should be based on conditional probability. Certain things have to happen in sequence.
But this should be based on conditional probability. Certain things have to happen in sequence.
Posted on 11/13/14 at 10:26 am to WG_Dawg
quote:
Uh, no it wouldn't.
uh, yes it would.
Posted on 11/13/14 at 10:26 am to WG_Dawg
quote:
Uh, no it wouldn't.
Flipping 4 consecutive heads when you run the experiment 10K times is pretty much certain
Posted on 11/13/14 at 10:32 am to TigerDik86
quote:
If you get four heads in a row, you win. If you make the tenth flip without getting four heads in a row, you lose.
conditional probability for 2 heads in a row
P(A|B) = P(A intersect B)/P(B)
ETA: Expand for four heads in a row updating the probability of B for each consecutive flip.
that is the probability for 1 experiment. You will run the experiment of 10 flips, 10k times.
This post was edited on 11/13/14 at 10:33 am
Posted on 11/13/14 at 10:35 am to CptBengal
quote:
CptBengal
Thank you guys!
Posted on 11/13/14 at 10:35 am to TigerDik86
I just did it and set 1 as heads and 0 as tails, did an if statement that if the previous 4 numbers totaled 4 then true, if not then false did that all the way down the 10 attempts. then expanded that out to 10000 attempts. got it on 2,458 of the 10,000
Posted on 11/13/14 at 10:36 am to Powerman
quote:
Powerman
Each game = 10 flips
4 heads in a row = win
whats the probability of winning over 10k games
Posted on 11/13/14 at 10:37 am to Powerman
quote:
Flipping 4 consecutive heads when you run the experiment 10K times is pretty much certain
I realize the ~ that he posted makes him correct, since ~ gives you a margin of error, but no it would not be a solid 100%.
I don't care if you run it one billion times...every single time you flip a coin it's 50/50. That is a fact. Of course the odds are extremely great you'd get 4 heads in a row after enough tests...but it is aboslutely not a 100% certainty.
Posted on 11/13/14 at 10:46 am to TigerDik86
Always switch to the other door
Posted on 11/13/14 at 10:53 am to TigerDik86
Does your homework need to be in Excel? Here's a quick and dirty Python solution:
leading dots here represent spaces in the python program.
Answer is about .24
I don't know Excel, but I'm guessing the same approach would work there -- build a string of 'h' and 't' for each run of 10, then look for a substring of 'hhhh'
quote:
import random
def flip():
..return random.choice(('h','t'))
def flip10():
..out=''
..for a in range(10):
....out += flip()
..return out
def check4(s):
..return 'hhhh' in s
count = 0
for a in xrange(10000):
..if check4(flip10()):
..count += 1
print float (count) / float (10000)
leading dots here represent spaces in the python program.
Answer is about .24
I don't know Excel, but I'm guessing the same approach would work there -- build a string of 'h' and 't' for each run of 10, then look for a substring of 'hhhh'
Posted on 11/13/14 at 11:00 am to TigerDik86
I just did it. missed on the first 10. The 2nd 10, got 4 heads in a row on my first 4 flips.
Posted on 11/13/14 at 11:11 am to WG_Dawg
quote:
I realize the ~ that he posted makes him correct, since ~ gives you a margin of error, but no it would not be a solid 100%.
I don't care if you run it one billion times...every single time you flip a coin it's 50/50. That is a fact. Of course the odds are extremely great you'd get 4 heads in a row after enough tests...but it is aboslutely not a 100% certainty.
Correct. Mathematically it can't be exactly equal to 100% because there is an absurdly small non zero probability of it not happening. But it's almost infinitely small.
Posted on 11/13/14 at 11:12 am to TigerDik86
If you were to get 8 heads in a row in a single 10 flip sequence wouldn't that change the overall win/loss % based on the formula you have set up in excel for calculating a win for only 4 in a row?
Posted on 11/13/14 at 11:21 am to LOCO5150
The 5th-10th coin flips need to be conditional on the first 4 for the equation to work. Simple programming.
Back to top
Follow TigerDroppings for LSU Football News