Download Operations on Random Variables

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Random Variables
Jim Bohan
Manheim Township School District
Lancaster, Pennsylvania
[email protected]
Definition of a Random
Variable
A variable is a random variable if its value is
determined by a probability event. Random
Variables are generally denoted by capital letters.
For example:
Let X be the random variable whose value is the
outcome of flipping a coin. Therefore, X {head,
tail}
Let Y be the random variable whose value is the
outcome of rolling a die.
Therefore, Y {1, 2, 3, 4, 5, 6}
Combining Random Variables
 It is common to add or subtract values of random
variables.
 When random variables are combined using
arithmetic operations, it is important to understand
exactly what the combination produces.
 For example:
Let X {1, 2, 3} and Y {50, 60, 70}
Then, X + Y {51, 52, 53, 61, 62, 63, 71, 72, 73}.
X + Y is the set of all possible sums of X and Y.
Probability & Random
Variables
Since a random variable takes on values
based on a probability event, it is most
appropriate to consider the probability that is
associated with the value of the variable.
Therefore, for example, it is important to link
the probability of .5 with each of the values
of the random X defined as the outcome of
flipping a coin.
Another Example
Let W be the random variable whose value is
the outcome of the number of head from
flipping three coins. The set of values and
their probabilities is then
 1   3   3   1  
W   3,  ,  2,  , 1,  ,  0,  
 8   8   8   8  
Probability Distributions
A Probability Distribution is the set of the values
and their corresponding probabilities of a random
variable.
For example, the Probability Distribution for the
random variable W = number of heads on three dice
is
 1
3
3
1 

 
   

W   3,  ,  2,  , 1,  ,  0,  
 8   8   8   8  
Describing Probability
Distributions
We can calculate the mean and standard
deviation of a probability distribution.
For discrete random variables:
n
X   X i pi
i 1
s
n
 X
i 1
 X  pi
2
i
For continuous random variables, the mean
and standard deviation is usually given.
Operations on Random
Variables
Consider the random variable X whose
values are the values of the roll of a die.
Calculate its mean and variance:
n
X   X i pi
i 1

n
s    X i  X  pi
2
X

i 1
2
Operations - continued
Consider the random variable Y = X + X,
that is, the sum of the values on two dice.
List the distribution (values and
probabilities) and calculate its mean and
variance: n
n
2
2
Y   Yi pi
i 1

sY   Yi  Y  pi
i 1

Summary of measures;
X = value on one die
Random
Variable
X
X
Y=X+X
Mean
Variance
Relationships – sum on two
dice
 Mean of the sum =
 Variance of the sum =
Another Example
Let H ={heights of husbands}.
Let W={heights of their wives}.
The values are in the table below:
Husband
H
65
56
72
75
70
Wife
W
56
48
70
71
68
Tasks
1. List all of the values in H – W:
2. Calculate the values of the mean and variance for
H and for W.
3. Calculate the values of the mean and variance for
H – W.
Summary of measures;
H= heights of husbands
W=heights of wives
Random
Mean
Variance
Variable
H
W
H-W
Relationships – husbands & wives
• Mean of the sum =
• Variance of the sum =
A Variation
Reconsider the data of the heights of the
husbands and their wives. Let us consider
the differences of heights of each married
couple.
H
W
H-W
65
56
72
75
70
56
48
70
71
68
9
8
2
3
2
Recalculate all of the means…
Random
Variable
H
W
H-W
Mean
Variance
An Unexpected Change
 Clearly the mean of the differences = the
difference of the means of the individual
random variables.
 However, the variance of the differences is
NOT the sum of the variances of the
individual random variables.
Why does the variance rule fail?
The Reason
When we only considered the married
couples, then the random variable of the
husband’s height and the random variable of
the wife’s height were not independent!
The rule for means appears to be true but the
rule on variances is contingent on whether
the random variables are independent.
The Rules for Combing
Random Variables
Means:
 The mean of a sums = the sum of the means.
 The mean of the difference = the difference of the means
Variances:
 The variance of the sum or difference = the sum of the
variances when the variables are independent.
 The variance of the sum or difference cannot be determined
from the variances of the variables when the variables are
not independent.
Related documents