Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
html
Random Variables
The sample spaces of random phenomena need not consist solely of numbers. For
example, they could be H, T. Often, it is convenient to associate a number with the
outcomes in a sample space.
e.g. flipping a coin H = 1, T = 0
e.g. flipping a coin 4 times: For each outcome, count the number of H (=0, 1, 2, 3, 4)
Random Variable:
Def#1: A random variable is a variable whose value is the numerical
outcome of a random phenomenon
Def#2: A random variable is a numerical function defined on the outcome
of a random phenomenon: that is, for each outcome there is assigned a
unique numerical value.
e.g. # of heads in 4 coin tosses.
Note 2: The assignment of probabilities to the value of a random variable X is called the
probability distribution of X
This can sometimes be expressed as a table
Outcome
x1
x2
x3
Probability
P1
P2
P3
Z: outcome 0 1 2 3
Probability .125 .375 .375 .125
XX: outcome 0 1 2 3 4
Probability .0625 .25 .375 .25 .0625
S
p
i
n
t
h
e
s
p
i
n
n
e
r
&
w
h
e
r
e
i
t
e
n
d
s
u
p
i
s
y
o
u
r
"
d
r
a
w
"
f
r
o
m
[
0
,
1
]
.
What does it mean to draw 'at random' from 0,1? Presumably, each interval of equal
length in [0,1] has the same probability of having the spinner stop in it.
This is a special case where every equal-length interval has the same probability. The area
of the entire interval = 1
Tough Question: What is the probability of a point? -even though we observe points, it
has to be 0
Essentially, random variables and lists are linked in the following way: suppose that some
lists of numbers represent the numerical outcomes of random phenomena/experiments.
Thus, the distriubtion of lists should correspond to the distribution of possible outcomes
of the random variable.
Of course, not all lists of numbers correspond to outcomes of a random variable but, in
this course, we are interested in the ones that do.
BUT: where does this fancy formula come from and what does it mean?
Actually, we can make sense of the notion x by just building on something we already
know how to do that is, computing averages.
Recall, if we have a list of numbers {x1, x2, , xn} we calculate the average number by
the formula:
Now, suppose our list comes from recording the results of an experiment. Suppose, to
choose a special case, that the list comes from repeatedly calculating the number of heads
in 2 tosses of a fair coin. Thus, our list might look something like:
{0 , 0 , 2 , 1 , 1 , 1 , 0 , 2 , 2 , 1 , 2 , 1 , 1 ,.}
In a sense, our list is just a record of the outcome of a discrete random variable that can
take on one of 3 possible values 0, 1, 2.
Let's get the average for the first 6 elements of the list:
Lets organize this calculation in just a little bit different way, but one which will help us a
lot.
But this will be true if we take 10 terms from the list or k terms
For large k
This is just the formula we started from. 'Mean' is much like 'limiting case of averages.'
The story I have told you is an application of what is called the 'Law of Large Numbers'
in combination with our frequency theory of probability.
To Recap:
If a discrete random variable X has possible outcomes x1, x2, xk (here we had k = 3, x1
= 0, x2 = 1 and x3 = 2) with associated probabilities P1, Pk, then the mean of the
random variable is:
x = Pixi
The mean is the average calculated with probabilities, which we take to be "long run"
relative frequencies.
Example: Vermont Lottery
Choose a 3 digit number (there are 1000 possible values, WHY?). IF your number
matches the one drawn at random, you get $500. Otherwise, you get 0. You pay $1 to
play the game.
What are expected winnings? x1 = 0, x2 = 500
P1 = .999, P2 = .001
Expected winnings = .999(0) + (.001)(500) = 0.50
In average you win 50 but you pay $1 to play, so your net winnings, on average, = -50.
The state takes home 50, on average, for every ticket purchased.
Outcomes
Probs.
.0625
.25
.375
.25
.0625
How the law of large numbers applies. Think of a list of 1000 outcomes of tossing a coin
4 times and counting the number of heads. Calculate the sample average
3, , 1000. Now, graph the results and you will get something like:
for k = 1, 2,