Chapter 5 - Part 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 31

Chapter 5-Part 1

Random Variables

Copyright © 2009 Cengage Learning


1- Random Variables…
• A random variable is a function or rule that assigns a number to
each outcome of an experiment. Basically it is just a symbol that
represents the outcome of an experiment.
- Examples:

• Experiment: Flip a coin 20 times. X = number of heads.

• Experiment: Inspect a shipment of 50 radios. X = Number of


defective radios.

• Experiment: Take a 20-question exam. Random variable: Number


of questions answered correctly.

Copyright © 2009 Cengage Learning 7.2


Two Types of Random Variables…
1) Discrete Random Variable
– one that takes on a countable number of values.

Examples:
X = Sum of values on the roll of two dices: X
has to be either 2, 3, 4, …, or 12.
Y = number of accidents in Doha during a
week: Y has to be 0, 1, 2, 3, 4, 5, 6, 7, 8, ……………real big
number.
Z = number of children in a family: Z has to be
0, 1, 2, 3, …
Copyright © 2009 Cengage Learning
Two Types of Random Variables…
2) Continuous Random Variable
– one whose values are not discrete, not countable.
Example 1:
- Let X= time to write a statistics exam in a university
where the time limit is 3 hours and students cannot leave
before 30 minutes.
 The smallest value of X is 30 minutes.
 The next value : it is 30.1? 30.01? 30.001? 30.0001?

Copyright © 2009 Cengage Learning


Two Types of Random Variables…
2) Continuous Random Variable
Example 2:
• The exact time it takes a city bus to complete its route may
be any value between two points, say 30 minutes to 35
minutes. If X is the time required, then X is continuous
because, if measured precisely enough, the possible values
of X can be any value in the interval 30 to 35 minutes.
• Other examples of continuous variables include measures
of distance and measures of weight when measured
precisely.
 A continuous random variable is generally defined by
measuring, which is contrasted with a discrete random
variable, whose value is typically determined by counting.
Copyright © 2009 Cengage Learning
Two Types of Random Variables…
Exercise 1
Consider the experiment of tossing a coin twice.
a. List the experimental outcomes.
b. Define a random variable that represents the number of
heads occurring on the two tosses. Show what value the
random variable would assume for each of the experimental
outcomes.
d. Is this random variable discrete or continuous?

Copyright © 2009 Cengage Learning


Two Types of Random Variables…
Exercise 2
Consider the experiment of a worker assembling a product.
Suppose that this worker can work non-stop 8 hours a day
every day. Define a random variable that represents the time
in minutes required to assemble the product.
a. What values may the random variable assume?
b. Is the random variable discrete or continuous?

Copyright © 2009 Cengage Learning


Two Types of Random Variables…
Exercise 3
• X is the volume of water used by a randomly chosen
household in a month. Is the random variable X discrete
or continuous?

• X is the number of classes a randomly chosen student


is taking. Is the random variable X discrete or continuous?

• X is the amount of cheese on a randomly chosen pizza.


Is the random variable X discrete or continuous?

Copyright © 2009 Cengage Learning


2- Probability Distributions…
A probability distribution is a table, formula, or graph that
describes the values of a random variable and the probability
associated with these values.
Graph
Table Formula
X 1 2 3 4 5 6
P(X) 1/6 1/6 1/6 1/6 1/6 1/6 P(X = x) = kx3

– Discrete Probability Distribution, (this chapter) and


Continuous Probability Distribution (Chapter 8)

Copyright © 2009 Cengage Learning


Probability Notation…
 An upper-case letter will represent the name of the
random variable, usually X.

 Its lower-case counterpart will represent the value of the


random variable.

 The probability that the random variable X will equal x is:


P(X = x)
or more simply
P(x)

Copyright © 2009 Cengage Learning


Discrete Probability Distributions…
 The probabilities of the values of a discrete random
variable may be derived by applying one of the definitions
of probability, so long as these two conditions apply:

Copyright © 2009 Cengage Learning


Discrete Probability Distributions…
Exercise 4:
Determine whether each of the following is a valid
probability distribution.
a. x 0 1 2 3
P(x) 0.1 0.3 0.4 0.1

b. x 5 -6 10 0
P(x) 0.01 0.01 0.01 0.97

c.
x 14 12 -7 13
P(x) 0.25 1.46 0.10 0.24

Copyright © 2009 Cengage Learning


Discrete Probability Distributions…
Exercise 5:
The probability distribution for the random variable x
follows. x 20 25 30 35
P(x) 0.20 0.15 0.25 0.40

a. Is this probability distribution valid?

b. What is the probability that x = 30?

c. What the probability that x is less than or equal to 25?

d. What is the probability that x is greater than 30?

e. What is the probability that x = 40?


Copyright © 2009 Cengage Learning
Example

The Statistical Abstract of the United States is published


annually. It contains a wide variety of information based on
the census as well as other sources. The objective is to
provide information about a variety of different aspects of
the lives of the country’s residents. One of the questions
asked households to report the number of color televisions in
the household. The following table summarizes the data.
Develop the probability distribution of the random variable
defined as the number of color televisions per household.

Copyright © 2009 Cengage Learning


Example

Number of Color Televisions Number of Households


0 1,218
1 32,379
2 37,961
3 19,387
4 7,714
5 2,842
Total 101,501

Copyright © 2009 Cengage Learning


Example
Probability distributions can be estimated from relative
frequencies.

1,218 ÷ 101,501 = 0.012

e.g. P(X=4) = P(4) = 0.076 = 7.6%


Copyright © 2009 Cengage Learning
Example
E.g. what is the probability there is at least one television but
no more than three in any given household?

“at least one television but no more than three”


P(1 ≤ X ≤ 3) = P(1) + P(2) + P(3) = 0.319 + 0.374 + 0.191 =
0.884

Copyright © 2009 Cengage Learning


Exercise 6
 The random variable X has the following probability
distribution.
x -3 2 6 8
P(x) 0.2 0.3 0.4 0.1

Find the following probabilities.


a. P( X ≥ 0) =
b. P(X ≥ 6) =
c. P(X ≥ -3) =
d. P(2≤ X ≤5) =
e. P(X ≤ 8) =
f. P(X ≥ 8) =
g. P(X > 8) =

Copyright © 2009 Cengage Learning


Population/Probability Distribution…

 The probability distribution often represents a population


Example 7.1 the population of number of TVs per household

 Since we have populations, we can describe them by


computing various parameters.

 E.g. the population mean and population variance.

Copyright © 2009 Cengage Learning


Population Mean (Expected Value)
 The population mean is the weighted average of all of its
values. The weights are the probabilities.

 This parameter is also called the expected value of X and


is represented by E(X).

Copyright © 2009 Cengage Learning


Example:
1) Find the mean for the population of the number of color televisions
per household… (from earlier Example)

 E(X) = 0(.012) + 1(.319) + 2(.374) + 3(.191) + 4(.076) + 5(.028)


 E(X) = 2.084
Copyright © 2009 Cengage Learning
Population Variance…
 The population variance is calculated similarly. It is the
weighted average of the squared deviations from the
mean.

 As before, there is a “short-cut” formulation…

 The standard deviation is the same as before:


Copyright © 2009 Cengage Learning
Example:
2) Find the variance and standard deviation for the population of the
number of color televisions per household…

= (0 – 2.084)2(.012) + (1 – 2.084)2(.319)+…+(5 – 2.084)2(.028)


= 1.107

Copyright © 2009 Cengage Learning


Example
3) Find the standard deviation for the population of the number of
color televisions per household…

► = 1.052

Copyright © 2009 Cengage Learning


Laws of Expected Value…
1) Rule 1: E(c) = c
 The expected value of a constant (c) is just the value of
the constant.

2) Rule 2: E(X + c) = E(X) + c

3) Rule 3: E(cX) = cE(X)

 We can “pull” a constant out of the expected value


expression.

Copyright © 2009 Cengage Learning


Laws of Expected Value…
Exercise 7:
The following table provides a probability distribution for
the random variable x.
x 3 6 9
P(x) 0.25 0.50 0.25

a. Compute the expected value of X.


b. Find E(100).
c. Compute E(X+7).
d. Compute E(10X).

Copyright © 2009 Cengage Learning


Laws of Variance…
1) Rule 1: V(c) = 0
 The variance of a constant (c) is zero.

2) Rule 2: V(X + c) = V(X)


 Adding or subtracting a constant does not change the
variance or standard deviation of a random variable.

3) Rule 3: V(cX) = c2V(X)


 Multiplying X by a constant changes the variance of X
by the square of c.

Copyright © 2009 Cengage Learning


Laws of Expected Value…
Exercise 8:
The following table provides a probability distribution for
the random variable X.
x 3 6 9
P(x) 0.25 0.50 0.25

a- Calculate the variance of X.


b- Find V(100)
c- Find V(X+7)
d- Calculate V(10X)
Re

Re
Copyright © 2009 Cengage Learning
Exercise 9
Monthly sales have a mean of $25,000 and a standard
deviation of $4,000. Profits are calculated by multiplying
sales by 30% and subtracting fixed costs of $6,000.
Find the standard deviation of monthly profits.

1) Describe the problem statement in algebraic terms:


sales have a standard deviation of $4,000
 V(Sales) = 4,0002 = 16,000,000
(remember the relationship between standard deviation and
variance )
Profits are calculated by  Profit = 0.30(Sales) – 6,000

Copyright © 2009 Cengage Learning


Exercise 9
Monthly sales have a mean of $25,000 and a standard
deviation of $4,000. Profits are calculated by multiplying
sales by 30% and subtracting fixed costs of $6,000.
Find the standard deviation of monthly profits.

2) The variance of profit is = V(Profit)


=V[0.30(Sales) – 6,000]
=V[0.30(Sales)] [by rule #2]
=(0.30)2V(Sales) [by rule #3]
=(0.30)2(16,000,000) = 1,440,000
Again, standard deviation is the square root of variance,
so standard deviation of Profit = (1,440,000)1/2 = $1,200

Copyright © 2009 Cengage Learning


Exercise 10

Let X represent the number of times a student goes to a park in a one


month period. Assume that the probability distribution of X is as follows:

a- Compute the expected value of X.


b- Compute the variance of X.
c- Find the mean and variance of Y = 5X - 2.

Copyright © 2009 Cengage Learning

You might also like