Lecture6 Slides
Lecture6 Slides
Lecture6 Slides
Definition: A random variable is a function that assigns a real number to each outcome in the sample
space of a random experiment.
A random variable with a countable number of values is said to be discrete; one that may
assume any value in some interval on the real number line is said to be continuous.
Example 8.1: Two balls are drawn in succession without replacement from an urn containing 4
red balls and 3 black balls. The possible outcomes and the values y of the random
variable Y, where Y is the number of red balls, are
Sample Space y
RR 2
RB 1
BR 1
BB 0
Example 8.3: Suppose a sampling plan involves sampling items from a process until a
defective is observed. The evaluation of the process will depend on how many
consecutive items are observed. In that regard, let X be a random variable defined
by the number of items observed before a defective is found. With N a
nondefective and D a defective, sample spaces are S = {D} given X = 1, S = {ND}
given X = 2, S = {NND} given X = 3, and so on.
Definition: The set of ordered pairs (x, f(x)) is a probability function, probability mass
function, or probability distribution of the discrete random variable X if, for each possible
outcome x,
1. f(x) ≥ 0,
2. ∑ f ( x) = 1
x
3. P(X = x) = f(x).
x=b
∑ f ( x)
4. P(a ≤ X ≤ b) =
x=a
Example 8.6: A shipment of 20 similar laptop computers to a retail outlet contains 3 that are
defective. If a school makes a random purchase of 2 of these computers, find the
probability distribution for the number of defectives.
Solution: Let X be a random variable whose values x are the possible numbers of defective
computers purchased by the school. Then x can only take the numbers 0, 1, and 2. Now
Solution: Let Y be a random variable whose values y are the possible numbers of heads that
appear. Then Y is a random variable taking on one of the values 0, 1, 2, and 3 with
respective probabilities
1
f(0) = P(Y = 0) = P((T, T, T)) =
8
3
f(1) = P(Y = 1) = P((T, T, H), (T, H, T), (H, T, T)) =
8
3
f(2) = P(Y = 2) = P((T, H, H), (H, T, H), (H, H, T)) =
8
1
f(3) = P(Y = 3) = P((H, H, H)) =
8
The distribution function F of X is a step function. That is, the value of F is constant in the
intervals [x i−1 , x i ) and then takes a step (or jump) of size p(x i ) at x i .
Now
11 5 3
f(2) = F(2) − F(1) = − =.
16 16 8
Definition: Let X be a random variable with probability distribution f(x). The mean, or
expected value, of X is
μ X = E(X) = ∑ xf ( x)
x
if X is discrete
Example 8.10: A purse contains 5 gold pounds and 7 half gold pounds pieces. A player is to
retain the two coins that he draws from the purse. What is the price to pay for the
privilege of participating?
Theorem: Let X be a random variable with probability distribution f(x). The expected value of
the random variable g(X) is
Example 8.13: Suppose that the number of cars X that pass through a car wash between 4:00
P.M. and 5:00 P.M. on any sunny Friday has the following probability
distribution:
PHM111s - Probability and Statistics
x 4 5 6 7 8 9
1 1 1 1 1 1
P(X = x)
12 12 4 4 6 6
Let g(X) = 2X−1 represent the amount of money, in dollars, paid to the attendant
by the manager. Find the attendant’s expected earnings for this particular time
period.
Solution: The attendant can expect to receive
9
E[g(X)] = E(2X − 1) = ∑ (2 x − 1) f ( x)
x=4
1 1 1 1 1 1
= (7)( ) + (9)( ) + (11)( ) + (13)( ) + (15)( ) + (17)( ) = $12.67.
12 12 4 4 6 6
Example 8.17: Applying the previous theorem to the discrete random variable f(X) = 2X − 1,
rework Example 8.13.
Solution: According to the theorem, we can write
E(2X − 1) = 2E(X) − 1.
Now
9
μ = E(X) = ∑ x f ( x)
x=4
1 1 1 1 1 1 41
= (4)( ) + (5)( ) + (6)( ) + (7)( ) + (8)( ) + (9)( ) = .
12 12 4 4 6 6 6
Therefore,
41
µ2 X −1 (2) =
= − 1 $12.67,
6
as before.
Definition: Let X be a random variable with probability distribution f(x) and mean μ. The
variance of X is
σ 2 = E[(X − μ)2] = ∑ ( x − µ ) 2 f ( x), if X is discrete
x
The positive square root of the variance, σ, is called the standard deviation of X.
The quantity x −μ is called the deviation of an observation from its mean. Since the deviations
are squared and then averaged, σ2 will be much smaller for a set of x values that are close to μ
than it will be for a set of values
that vary considerably from μ.
x 0 1 2 3
f(x) 0.51 0.38 0.1 0.01
calculate σ 2 .
Solution: First, we compute
μ = (0)(0.51) + (1)(0.38) + (2)(0.10) + (3)(0.01) = 0.61.
Now,
E(X2) = (0)(0.51) + (1)(0.38) + (4)(0.10) + (9)(0.01) = 0.87.
Therefore,
σ = 0.87 − (0.61)2 = 0.4979.
2
Also σ = 0.7056 (Var(2X-1) = ???)
PHM111s - Probability and Statistics