Class Notes
(810,831)

Canada
(494,268)

University of Alberta
(12,946)

Statistics
(237)

STAT151
(146)

Susan Kamp
(11)

Lecture

# 16, 17.pdf

Unlock Document

University of Alberta

Statistics

STAT151

Susan Kamp

Fall

Description

Ch 16 Random Variables
A variable x is a random variable (rv) if its value depends on the
outcome of a random event.
- we use a capital letter, like X, to denote a random variable
- A particular value of a random variable will be denoted with
a lower case letter, in this case x.
Example:
X = number of observed "Tail" while tossing a coin 10 times
X = survival time after specific treatment of a randomly
selected patient
X = SAT score for a randomly selected college applicant
Similar as for variables in sample data, rvs can be categorical or
quantitative, and if they are quantitative, they can be either
discrete or continuous.
Categorical
Random Discrete
Variable
Quantitative
Continuous
1 of 24 Similar to data description, the models for rvs depend entirely on
the type the rv. The models for continuous rvs will be different
than those for discrete rvs.
Discrete random variables can take one of a finite number of
distinct outcomes.
Example:
- the number of stores in a shopping mall
- the number of cars owned by a family
- the number of luggages each traveler carries in the airport
Continuous random variables can take any numeric value within
a range of values.
Example:
- Cost of books this term
- Height of football players
Definition:
- A probability model for a random variable consists of:
o The collection of all possible values of a random
variable, and
2 of 24 o the probabilities that the values occur.
Value of X x1 x2 x3 … xn
Probability P(x1) P(x )2P(x ) 3 … P(x n
Properties of discrete probability distributions:
0 P(x) 1
i
P(x) i 1
Example:
Toss two unbiased coins and let x equal the number of heads
observed. Construct a probability distribution for x.
The simple events of this experiment are:
coin1 coin 2 x P(simple event)
3 of 24 So that we get the following distribution for x = number of heads
observed:
x P(x)
0 1/4
1 1/2
2 1/4
With the help of this distribution, find P(x < 1).
Pbty Histogram of x
Frequency
0 1 2 More
Bin
Example
Rosana is planning whether she should continue to use TopHat in
her intro statistics class next Semester. She asked her current
statistics students whether they like TopHat, and she found that
_______% of students like TopHat. Two students are randomly
selected from this class. Let x denote the number of students in
4 of 24 this sample who likes TopHat. Develop the probability
distribution of x.
Solution:
Let F = the student selected likes TopHat
O = the voter selected dislikes TopHat
So that we get the following distribution for x:
x P(x)
0
1
2
5 of 24 Expected Value: Center
The expected value E(X) or population mean (mu) of a rv X is
the value that you would expect to observe on average if the
experiment is repeated over and over again. It is the center of the
distribution.
Definition:
Let X be a discrete rv with probability distribution P(x). The
population mean or expected value of x is given as
= E(X) = x Pix). i
In other words, the expected value of a (discrete) random variable
can be found by summing the products of each possible value and
the probability that it occurs.
NOTE:
Be sure that every possible outcome is included in the sum
Verify that you have a valid probability model to start with.
Example 1:
Find the expected value of the distribution of X = the number of
heads observed tossing two coins.
= E(X) =
6 of 24 Example 2:
Consider the TopHat example again. Let X be the number of
students who like TopHat in a sample of two students. Find the
expected value of the distribution of X.
= E(X) =
Example 3:
A wheel comes up green 50% of the time and red 50% of the time.
If it comes up green, you win $100, if it come up red you win
nothing. Intuitively, how much do you expect to win on one spin,
on average?
Example 4:
BatCo, a company that sells batteries, claims that 99.5% of their
batteries are in working order. How many batteries would you
expect to buy, on average, to find one that does not work?
7 of 24 Example 5:
A friend of yours plans to toss a fair coin 200 times. You watch
the first 40 tosses, noticing that she got only 16 heads. But then
you get bored and leave. If the coin is fair, how many heads do
you expect her to have when she has finished the 200 tosses?
Standard Deviation (Spread)
Let X be a discrete rv with probability distribution P(x). The
population variance of X is
= Var(X) = E((X – ) ) = (x – ) P(x) 2
i i
The population standard deviation (sigma) of a rv x is equal to
the square root of its variance.
2
Var(X) .
Example 1 (con’t):
Find the population variance and standard deviation of X =
number of heads observed tossing two coins.
8 of 24 Example 2:
Consider the TopHat example again. Let X be the number of
students who like TopHat in a sample of two students. Find the
population variance and standard deviation of X.
= E(X) =
Example (Please try it on your own):
Consider tossing an unbiased dice and recording the number on
upper face X. Find the expected value, variance and standard
deviation of the distribution of X.
= E(X) = x P(x) i i
= 1(1/6) + 2(1/6) + 3(1/6) + 4(1/6) + 5(1/6) + 6(1/6) = 3.5
2 2 2 2
= (1 – 3.5) 1/6 + (2 – 3.5) 1/6 + (3 – 3.5) 1/6 +
2 2 2
(4 – 3.5) 1/6 + (5 – 3.5) 1/6 + (6 – 3.5) 1/6
= 2.91666
2
2.91666 1.7078
Distribution for x
0.18
0.16
0.14
00.1
0.08
probability
0.04
0.02
1 2 3 4 5 6
upper face number
9 of 24 More About Means and Variances
- Adding or subtracting a constant from data shifts the mean
but doesn’t change the variance or standard deviation:
E(X ±c) = E(X) ±c Var(X ±c) = Var(X)
Example: The average midterm mark for this Statistics Class is
____________ with a standard deviation of ____________.
Consider everyone in this class receives an extra 5marks. What
will be the mean and standard deviation of the average midterm
mark after the increase in mark?
Let X = original mark and S = new mark, then S = X + 5%
- Multiplying each value of a random variable by a constant
multiplies the mean by that constant and the variance by the
square of the constant:
E(aX) = aE(X) Var(aX) = a Var(X)
10 of 24 Example: The average midterm mark for this Statistics Class is
____________ with a standard deviation of ____________.
Consider everyone in this class receives a 5% increase in marks.
What will be the mean and standard deviation of the average
midterm mark after the increase in mark?
Let X = original mark and S = new mark, then S = 1.05 X
Example: (Please try it on your own)
The average monthly income for ABC company’s employees is
$5830 with a standard deviation of $8620. Consider everyone in
ABC company receiving a $5000 increase in salary. What will be
the mean and standard deviation of the monthly income after the
increase in salary?
Let X = original salary, S = new salary, then S = X + $5000
E(S) = E(X + 5000) = E(X) + 5000 = 5830 + 5000 = 10830
Var(S) = Var(X + 5000) = Var(X) = $8620 2
SD(S) = $8620 No change in SD.
11 of 24 Example: (Please try it on your own)
The average monthly income for ABC company’s employees is
$5830 with a standard deviation of $8620. Consider everyone in
ABC company receiving a 10% increase in salary. What will be
the mean and standard deviation of the monthly income after the
increase in salary?
Let X = original salary, S = new salary, then S = 1.1 X
E(S) = E(1.1X) = 1.1E(X) = 1.1(5830) = 6413
2 2 2
Var(S) = Var(1.1X) = 1.1 Var(X) = 1.1 * $8620
SD(S) = $9482
Two Random Variables
- The mean of the sum (difference) of two random variables is
the sum (difference) of the means.
E(X ±Y) = E(X) ±E(

More
Less
Related notes for STAT151