10:48 2014-10-06
start Harvard statistics, video 9
Gambler's ruin & random variables
10:49 2014-10-06
* conditioning is the soul of statistics
* random variables & their distributions
10:56 2014-10-06
Gambler's Ruin problem:
Two gamblers A & B, sequence of rounds bet $ 1,
P = P(A wins a certain round), q = 1-p // B wins round
repeat until one of them goes to bankrupt.
ruins means bankrupcy
assuming A starts with $ i, B starts with $ (N-i)
11:02 2014-10-06
that's the setup of the problem
11:02 2014-10-06
another way to think of this is a "random walk"
11:03 2014-10-06
random walk
11:03 2014-10-06
absorbing state at 0, N
11:06 2014-10-06
how many round the game will lasts?
mathematically it can last forever.
11:08 2014-10-06
strategy: condition on 1st step
11:10 2014-10-06
you have to pick something to condition on to
break it up into manageable pieces.
11:11 2014-10-06
Let Pi = P(A wins game | A starts at $i)
11:13 2014-10-06
LOTP == Law Of Total Probability
11:13 2014-10-06
this is a recursive equation
11:16 2014-10-06
computer are very good at recursion
11:16 2014-10-06
difference equation, differential equation
11:17 2014-10-06
we would very quickly run out of notation.
11:50 2014-10-06
we need the concept of random variable
11:50 2014-10-06
we need the notion of a function
11:58 2014-10-06
What is a random variable?
It's a function from the sample sapce S to the R
11:59 2014-10-06
think of the random variable as a numerical "summary"
of an aspect of the experiment.
12:03 2014-10-06
each possbile outcomes maps to some number.
12:04 2014-10-06
Defn(Bernoulli distribution):
A r.v. X is said to have Bernoulli(p) distribution
if X has only 2 possible values, 0 & 1, and
P(X = 1) = p, P(X = 0) = 1-p
12:05 2014-10-06
then we say that this is a Bernoulli p r.v.
12:07 2014-10-06
before we do the experiment, we don't know
whether it's going to be 0 or 1;
after we do this experiment, either it turns out
to be 0 or 1
12:08 2014-10-06
Binomial(n, p) The distribution of #successes in
n independent Bernoulli(p) trials is called Binomial(n,p)
its distribution is given by
P(X = k) // X is going to an integer between 1 & n
12:10 2014-10-06
Bernoulli trials
12:11 2014-10-06
Bernoulli(p) => Binomial(n, p)
12:11 2014-10-06
PMF == Probability Mass Function
12:14 2014-10-06
one quick comment about the Binomial, suppose
X ~ Binomial(n, p), Y ~ Bin(m, p), independent
then X + Y ~ Bin(n,p)
start Harvard statistics, video 9
Gambler's ruin & random variables
10:49 2014-10-06
* conditioning is the soul of statistics
* random variables & their distributions
10:56 2014-10-06
Gambler's Ruin problem:
Two gamblers A & B, sequence of rounds bet $ 1,
P = P(A wins a certain round), q = 1-p // B wins round
repeat until one of them goes to bankrupt.
ruins means bankrupcy
assuming A starts with $ i, B starts with $ (N-i)
11:02 2014-10-06
that's the setup of the problem
11:02 2014-10-06
another way to think of this is a "random walk"
11:03 2014-10-06
random walk
11:03 2014-10-06
absorbing state at 0, N
11:06 2014-10-06
how many round the game will lasts?
mathematically it can last forever.
11:08 2014-10-06
strategy: condition on 1st step
11:10 2014-10-06
you have to pick something to condition on to
break it up into manageable pieces.
11:11 2014-10-06
Let Pi = P(A wins game | A starts at $i)
11:13 2014-10-06
LOTP == Law Of Total Probability
11:13 2014-10-06
this is a recursive equation
11:16 2014-10-06
computer are very good at recursion
11:16 2014-10-06
difference equation, differential equation
11:17 2014-10-06
we would very quickly run out of notation.
11:50 2014-10-06
we need the concept of random variable
11:50 2014-10-06
we need the notion of a function
11:58 2014-10-06
What is a random variable?
It's a function from the sample sapce S to the R
11:59 2014-10-06
think of the random variable as a numerical "summary"
of an aspect of the experiment.
12:03 2014-10-06
each possbile outcomes maps to some number.
12:04 2014-10-06
Defn(Bernoulli distribution):
A r.v. X is said to have Bernoulli(p) distribution
if X has only 2 possible values, 0 & 1, and
P(X = 1) = p, P(X = 0) = 1-p
12:05 2014-10-06
then we say that this is a Bernoulli p r.v.
12:07 2014-10-06
before we do the experiment, we don't know
whether it's going to be 0 or 1;
after we do this experiment, either it turns out
to be 0 or 1
12:08 2014-10-06
Binomial(n, p) The distribution of #successes in
n independent Bernoulli(p) trials is called Binomial(n,p)
its distribution is given by
P(X = k) // X is going to an integer between 1 & n
12:10 2014-10-06
Bernoulli trials
12:11 2014-10-06
Bernoulli(p) => Binomial(n, p)
12:11 2014-10-06
PMF == Probability Mass Function
12:14 2014-10-06
one quick comment about the Binomial, suppose
X ~ Binomial(n, p), Y ~ Bin(m, p), independent
then X + Y ~ Bin(n,p)