#probability question

62 messages · Page 1 of 1 (latest)

raven goblet
#

is there an equation for how close to 50% the number of heads will be as you increase the number of coin flips? i know it would get closer forever but i want an equation for it

languid kilnBOT
haughty belfry
#

what do you mean specifically by "how close"?

#

because obviously some cases will be 0% and some will be 100%

#

thus you need to refer to a certain range

raven goblet
#

like shouldn’t the standard deviation for how close it is to 50% over time consistently get smaller

haughty belfry
#

yea

raven goblet
haughty belfry
#

oh i think you misunderstand

#

let's suppose we run 100 trials where we flip a given coin 100 times

#

on average 50 of the coins will land heads

#

this is clear

#

however maybe in around 50% of the cases it will be less than 48 or greater than 52

#

in maybe 90% of the cases it will lie within 35 and 65 heads

#

and in 99% of the cases it might lie within 20 and 80

#

alternatively you can ask "what's the average deviation from 50 heads" which is also not so hard to calculate

raven goblet
#

yeah i’m looking more to like 1 million flips to 500 million flips would there be an equation for its deviation from 50% as the flips increase

haughty belfry
#

"deviation" is an imprecise word

#

do you want the standard deviation

#

or the average deviation

#

standard deviation is more useful if you wanna do more sophisticated analysis

#

average deviation tells you on average how far it is from 50

#

y'know what ill just send both

raven goblet
#

thanks lol i’m not sure what i’m looking for really

haughty belfry
#

do you know what a probability density function is

#

also do you want the more accurate version or the less complicated approximation (it's only less accurate for small numbers of coin flips)

raven goblet
#

more accurate would be better, im trying to use it for something practical

#

sorry for late response

haughty belfry
#

ok

#

I'm gonna write choose as $C(n, k)=\frac{n!}{k!(n-k)!}$ for simplicity of latex

unkempt questBOT
#

marival

haughty belfry
#

Assume that you flip a coin n times.

raven goblet
#

n is rolls k is possible outcomes?

haughty belfry
#

n choose k is used in the formulas

haughty belfry
#

$\sigma = \sqrt{\int^n_0 \left(C(n, x)\frac{1}{2^n}\right)\left(x-\frac{n}{2}\right)^2 dx}$

#

The mean absolute deviation is given as follows

#

$MAD = \int^n_0 \left(C(n, x)\frac{1}{2^n}\right)\left| x-\frac{n}{2}\right| dx$

raven goblet
#

thank you, i’m still a little confused on what k is tho

haughty belfry
#

oh just a typo

unkempt questBOT
#

marival

#

marival

haughty belfry
#

if you wanna do further analysis use the standard deviation

#

if you just want the "average deviation" use the mean absolute deviation

#

and if you are so inclined to learn further, i found this thread upon a whim one time

raven goblet
#

thanks mate

mighty reef
#

i mean it could just go HTHTHTHT forever and then it would be very close

#

or it could go HHHHHHHH forever and then it would be very far

#

so it'll be a probability distribution

#

so let S_n be the number of heads after n flips

#

then (S_n)/n will be the proportion of heads

#

and 0.5 will be the expected proportion of heads

#

so you're trying to find the distribution of D_n = (S_n)/n - 0.5, the difference in proportion after n tosses

#

it turns out that this converges to a normal distribution, by the central limit theorem

#

the difference will be normally distributed with mean 0 (equal chance of the proportion being more than c above 0.5 as more than c below 0.5)

and the variance turns out to be s^2/n, where s^2 is the variance of a single toss

#

the variance of a single coin flip turns out to 0.25 i believe

#

so the variance is 1/4n

#

so you can see that as n grows large, the variance gets smaller and smaller

#

it's like a thinner and thinner normal distribution

#

google like 'central limit theorem coin flipping' for more info, that'll probs help