Professional Documents
Culture Documents
CONTENTS
6.1. Random variables
6.2. The probability distribution for a discrete random variable
6.3. Numerical characteristics of a discrete random variable
6.4. The binomial probability distribution
6.6. The Poisson distribution
6.6 Continuous random variables: distribution function and density function
6.7 Numerical characteristics of a continuous random variable
6.8. The normal distribution
6.9. The Exponential distribution
6.10. Exercises
Definition 6.1
A random variable is a variable that assumes numerical values associated with events
of an experiment.
A random variable can be classified as being either discrete or continuous depending on
the numerical values it assumes.
Classification of random variables
Random variables may be divided into two types: discrete random variables and
continuous random variables.
Among the random variables described above the number of boys in Example 6.1 and the
number of patients in Example 6.2 are discrete random variables, the height of students
and the weight of babies are continuous random variables.
Example 6.6 Suppose you randomly select a student attending your university. Classify
each of the following random variables as discrete or continuous:
Number of credit hours taken by the student this semester
Current grade point average of the student.
Solution
The number of credit hours taken by the student this semester is a discrete
random variable because it can assume only a countable number of values (for
example 10, 11, 12, and so on). It is not continuous since the number of credit
hours can not assume values as 11.6678, 16.3466 and 12.9876 hours.
The grade point average for the student is a continuous random variable because
it could theoretically assume any value (for example, 6.466, 8.986)
corresponding to the points on the interval from 0 to 10 of a line.
for example, suppose we want to find out the probability distribution for the number of
heads on three tosses of a coin:
Number of heads Probability
X P(X)
0 1/8
1 3/8
2 3/8
3 1/8
X P(X)
x1 p1
x2 p2
where P(X) is the probability that the variable X assume the value X k (k = 1, 2,..., n).
Example 1
To make things a bit more interesting here, we will consider the experiment in which a
fair coin is flipped five times (or five identical coins are flipped simultaneously). We
know from previous work that this experiment will have 26 = 32 distinct outcomes.
Now, define:
Then, X is a random variable (because it associates a numerical value with each of the 32
outcomes), and further, it is a discrete random variable because x can have only the
distinct values 0, 1, 2, 3, 4, or 6.
The probability distribution for X is just some way of specifying the probability of
observing each possible value of X.
x Pr(x)
0 1/32 =
0.03126
1 6/32 =
0.16626
2 10/32 =
0.3126
3 10/32 =
0.3126
4 6/32 =
0.16626
6 1/32 =
0.03126
total: 32/32 = 1
Example 3
A balanced coin is tossed twice and the number x of heads is observed. Find the
probability distribution for x.
Solution
Let Hk and Tk denote the observation of a head and a tail, respectively, on the kth toss, for
k = 1, 2. The four simple events and the associated values of x are shown in Table 6.1.
The event X = 0 is the collection of all simple events that yield a value of X= 0, namely,
the simple event E4. Therefore, the probability that x assumes the value 0 is
P(x = 0) = p(0) = P(E4) = 0.25.
The event X = 1 contains two simple events, E2 and E3. Therefore,
P(X = 1) = p(1) = P(E2) + P(E3) = 0.25 + 0.25 = 0.5.
Finally,
P(x = 2) = p(2) = P(E1) = 0.25.
x p(x)
0 0.25
1 0.5
2 0.25
For example, in a survey of 300 households 54 had no children, 117 had one child, 72
had two children, 42 had three children, 12 had four children and 3 had five children. If
we wanted to select one of these households for a follow-up survey we can compute the
probability of obtaining a household with different numbers of children. Table 6.3
provides the necessary information. In this we denote X as the number of children per
household and p(x) as the probability of the random variable taking a specific value. For
instance p(1) provides the probability that a randomly selected household has just one
child. In this case, this is 0.39.
Table 6.3: Probability Distributions for the Number of Children per Household
x p(x)
0 0.18
1 0.39
2 0.24
3 0.14
4 0.04
5 0.01
f(x) = 1
0.350
0.3125 0.3125
0.300
0.250
0.200
P r(x)
0.15625 0.15625
0.150
0.100
0.03125 0.03125
0.050
0.000
0 1 2 3 4 5
Other than the visual image this representation gives, there's no real new information here
that wasn't present in the tabulation earlier. Because we've drawn the columns for each
possible value of x to have a width of 1 unit, the shaded areas and the probabilities are
equivalent.
The best graph for the discrete random variable is bar graph. This is shown below for the
two-coin-toss example.
Figure 6.1 Probability distribution for X, the number of heads in two tosses of a coin
0.6
0.5
0.4
0.3
0.2
0.1
0
0 1 2
The sum of all probabilities p(x) over all possible values of x is 1, that is
allx P( X x) P( x) 1
allx
Example
Let X = outcome of a 6-sided die
X 1 2 3 4 6 6
P(X) 1/6 1/6 1/6 1/6 1/6 1/6
The sum of all probabilities is 1 since 1/6 + 1/6 + · · · + 1/6 = 1 and all probabilities are
between 0 and 1.
Example
Consider the random variable X having the following probability distribution
X 2 3 5 7
P(X) 0.1 0.4 0.2 0.3
Very early in the course, you encountered cumulative frequencies and cumulative relative
frequencies. Cumulative probabilities are analogous. They are just probabilities that x is
less than or equal to some value. All random variables (discrete and continuous) have a
cumulative distribution function. It is a function giving the probability that the random
variable X is less than or equal to x, for every value x.
Formally, the cumulative distribution function F(x) is defined to be:
for
For a discrete random variable, the cumulative distribution function is found by summing
up the probabilities as in the example below.
For the five-coin-toss example, we can easily tabulate cumulative probabilities using the
probabilities for the individual values of x in the table above:
k Pr(x k)
0 1/32 = 0.03125
1 6/32 = 0.1875
2 16/32 = 0.5
3 26/32 = 0.8125
4 31/32 = 0.96875
5 32/32 = 1
Cumulative probabilities are particularly useful for calculating the probability that ranges
of values of x occur. Thus, for example,
Pr(1 x 4) = Pr (x 4) - Pr(x 0)
= 0.96875 - 0.03125 = 0.9375
F(t) = P(X t) = p( X )
x
Definition 6.4
The expected value (or mean) of a random variable x, denoted by the symbol E(x), is
defined as follows:
Let x be a discrete random variable with probability distribution p(x). Then the mean
or expected value of x is
E(x) xp(x)
all x
Example 6.6 For example, in a survey of 300 households 54 had no children, 117 had
one child, 72 had two children, 42 had three children, 12 had four children and 3 had five
children.
Table 1.1: Probability Distributions for the Number of Children per Household
x p(x)
0 0.18
1 0.39
2 0.24
3 0.14
Using the data from table 1.1, the mean can be readily computed as
Note
The larger the variance, the further that individual values of the random variable
(observations) tend to be from the mean, on average;
The smaller the variance, the closer that individual values of the random variable
(observations) tend to be to the mean, on average;
Taking the square root of the variance gives the standard deviation, i.e.:
The variance and standard deviation of a random variable are always non-negative.
Definition 6.6
The second important numerical characteristics of random variable are its variance
and standard deviation, which are defined as follows:
Let x be a discrete random variable with probability distribution p(x). Then the
variance of x is
2 (x- ) 2 P(x)
The standard deviation of x is the positive square root of the variance of x:
2
Table 1.2: Calculation of the Variance for Number of Children per Household
Thus, in this case 2 = 1.25. The square root of this expression provides the standard
deviation for the number of children per household and this is given by:
= 1.25 1.118
This again is measure in the same units as the random variable, which is children per
household.
Note: Consider the following.
The definitions for population mean and variance used with an ungrouped frequency
distribution were:
Some of you might be confused by only dividing by N. Recall that this is the population
variance, the sample variance, which was the unbiased estimator for the population
variance was when it was divided by n-1.
Using algebra, this is equivalent to:
Recall that a probability is a long term relative frequency. So every f/N can be replaced
by p(x). This simplifies to be:
What's even better, is that the last portion of the variance is the mean squared. So, the two
formulas that we will be using are:
Example 6.7 Refer to the two-coin tossing experiment and the probability distribution
for x, shown in Figure 6.1. Find the variance and standard deviation of x.
x^2 p(x) 1/6 4/6 9/6 16/6 25/6 36/6 91/6 = 15.1667
The mean is 7/2 or 3.5
The variance is 91/6 - (7/2)^2 = 35/12 = 2.916666...
The standard deviation is the square root of the variance = 1.7078
Do not use rounded off values in the intermediate calculations. Only round off the final
answer.
Example 1: A multiple choice test contains 20 questions. Each question has five choices
for the correct answer. Only one of the choices is correct. With random guessing, does
the test have a binomial probability distribution?
Example 2: An experiment consists of flipping a fair coin 8 times and counting the
number of tails. Does this experiment have a binomial probability distribution?
Example 3: A pair of dice is rolled 37 times and the number of times a sum of 7 is
observed is recorded. Does this experiment have a binomial probability distribution?
Example 4: A multiple choice test contains 20 questions. Each question has four or five
choices for the correct answer. Only one of the choices is correct. With random guessing,
does this test have a binomial probability distribution?
where
p = probability of a success on a single trial, q=1-p
n = number of trials,
x= number of successes in n trials
The term p is the probability of getting a success on any one trial; the term
q = 1-p is the probability of getting a failure on any one trial.
The terms p and q remain constant through the sequence of trials undertaken.
In n trials only x successes are possible where x is a whole number between 0 and n.
Example 1:
A coin is tossed three times. Find the probability of getting exactly two heads.
Solution:
This problem can be solved by looking that the sample space. There are three ways to get
two heads.
HHH, HHT, HTH, THH, TTH, THT, HTT, TTT
3
The answer is or 0.375.
8
Looking at the problem in the previous example from the standpoint of a binomial
experiment, one can show that it meets the four requirements.
1. There are only two outcomes for each trial, heads or tails.
2. There is a fixed number of trials (three).
3. The outcomes are independent of each other (the outcome of one toss in no way
affects the outcome of another toss).
4. The probability of a success (heads) is 1/2 in each case.
In this case, n = 3, X = 2, p = 1/2, and q = 1/2. Hence, substituting in the formula gives
This is the first part of the binomial formula. (Some calculators can be used for this.)
has a probability of 1/2 and can occur once, giving the part of the formula. To
generalize, then, each success has a probability of p and can occur X times, and each
failure has a probability of q and can occur (n-X) times. Putting it all together yields the
binomial formula.
Example 2
If a student randomly guesses at five multiple-choice questions, find the probability
that the student gets exactly three correct. Each question has five possible choices.
Solution
In this case n = 6, X = 3, and p = 1/6, since there is one chance in five of guessing a
correct answer. Then,
Example 3
A survey from Teenage Research Unlimited (Northbrook, Ill.) found that 30% of
teenage consumers receive their spending money from part-time jobs. If five teenagers
are selected at random, find the probability that at least three of them will have part-time
jobs.
Solution
To find the probability that at least three have a part-time job, it is necessary to find the
individual probabilities for either 3, 4, or 6 and then add them to get the total probability.
Hence,
P(at least three teenagers have part-time jobs) = 0.132 + 0.028 + 0.002 = 0.162
Example 4: An experiment consists of flipping a fair coin 8 times and counting the
number of tails. Find the probability of seeing exactly 3 tails.
Example 5: A multiple choice test contains 20 questions. Each question has five choices
for the correct answer. Only one of the choices is correct. What is the probability of
making an 80 with random guessing?
Example 6: An experiment consists of flipping a fair coin 8 times and counting the
number of tails. Find the probability of seeing exactly 6 or 7 tails.
where
p = probability of a success on a single trial,
q=1-p
n = number of trials
These formulas are algebraically equivalent to the formulas for the mean, variance, and
standard deviation of discrete random variables for probability distributions, but because
they are for variables of the binomial distribution, they have been simplified using
algebra. The algebraic derivation is omitted here, but their equivalence is shown in the
next example.
From the previous example, when four coins are tossed many, many times, the average of
the number of heads that appears is two, and the standard deviation of the number of
heads is one. Note that these are theoretical values.
As stated previously, this problem can be solved by using the expected value formulas.
The distributions is shown as follows:
No. of
heads, 0 1 2 3 4
X
Probabi
1/14/ 6/ 4/ 1/1
lity,
6 16 16 16 6
P(X)
Exercise 1: An experiment consists of flipping a fair coin 10 times and counting the
number of heads. Find the mean and standard deviation for this experiment.
Exercise 2: Approximately 15% of all KSU students commute more than 20 miles one-
way to campus. Would it be unusual in a class of 60 students to have 16 students who
commute more than 20 miles one-way to campus?
The mean is 60*.15 = 9 and the standard deviation
.
Hence the z-score is
(v) The occurrences in each interval can vary from zero to infinity.
We can use the Poisson model in the following example. Assume that bank customers
arrive randomly on weekday afternoons at an average of 3.2 customers per 2 minute
interval. Find the probability of exactly four customers arriving in a 2-minute interval on
a weekday afternoon ?
In this case x = 4 customers, = 3.2 so it is relatively easy to obtain the probability using
the Poisson model.
Thus, the probability that exactly four customers arrive in a two minute interval on a
weekday afternoon is 0.1781 or there is a 17.81 per cent chance of this event occurring.
Example 2:
If there are 500 customers per eight-hour day in a check-out lane, what is the probability
that there will be exactly 3 in line during any five-minute period?
The expected value during any one five minute period would be 500 / 96 = 5.2083333.
The 96 is because there are 96 five-minute periods in eight hours. So, you expect about
5.2 customers in 5 minutes and want to know the probability of getting exactly 3.
p(3;500/96) = e^(-500/96) * (500/96)^3 / 3! = 0.1288 (approx)
Exercises
1. Suppose a bank knows that on average 60 customers arrive in a certain service
hour. Using a time interval of 1 minute, calculate the probability of exactly one
customer arriving in a given one minute interval within that hour.
2. Suppose a bank knows that on average 60 customers arrive in a certain service
hour. Using a time interval of 1 minute, calculate the probability of no customers
arriving in a given one minute interval within that hour.
3. Suppose a bank knows that on average 60 customers arrive in a certain service
hour. Using a time interval of 1 minute, calculate the probability of exactly three
customers arriving in a given one minute interval within that hour.
4. Suppose a bank knows that on average 60 customers arrive in a certain service
hour. Using a time interval of 1 minute, calculate the probability of more than
three customers arriving in a given one minute interval within that hour.
The mean and variance of a random variable X that has a Poisson distribution with
parameter are mean =E(X) = and Variance = V(X) = , i.e.,
E(X) = Var(X) =
The probability density function of a continuous random variable is a function which can
be integrated to obtain the probability that the random variable takes a value in a given
interval.
So the c.d.f. is found by integrating the p.d.f. between the minimum value of X and t.
Similarly, the probability density function of a continuous random variable can be
obtained by differentiating the cumulative distribution.
The c.d.f. can be used to find out the probability of a random variable being between two
values:
P( s X t ) = the probability that X is between s and t. But this is equal to the
probability that X t minus the probability that X s .
E(X) is also called the average value of X. It is what we expect to get if we take the
average of many values of X obtained in experiments.
Example 1
Let X have probability density function given by
f(x) = 3x2,
with domain [0, 1]. Find E(X).
Normal Distribution
A continuous random variable has a normal distribution if that distribution is symmetric
and bell shaped. The normal (or Gaussian) density function was proposed by C.F.Gauss
(1777-1866) as a model for the relative frequency distribution of errors, such errors of
measurement. Amazingly, this bell-shaped curve provides an adequate model for the
relative frequency distributions of data collected from many different scientific areas.
The normal curve is sometimes referred to as a bell-shaped curve with values that mound
up only in the central portion of the curve. The values of x can vary from minus infinity
to plus infinity but most of the values will be concentrated around the mean. Values in
either tail of the normal curve are possible but have a small probability of occurring. The
normal distribution is fully described by just two parameters - its mean () and its
standard deviation (). The normal distribution is a family of curves. Each unique value
of the mean and each unique value of the standard deviation generates a different normal
curve. The probability density function of the normal distribution is given by the
following expression:
1 2
/ 2 2
f ( x) e ( x )
2
The density function, mean and variance for a normal random variable
The density function:
1 2
/ 2 2
f ( x) e ( x )
2
The parameters and 2 are the mean and the variance , respectively, of the normal
random variable
The case where 0 and 1 is called standard normal distribution. The equation
for the standard normal distribution is given by
2
e x / 2
f ( x)
2
Pr(Z < b) represents the probability a standard normal random variable is less than b.
Note that the integral calculus is used to find the area under the normal distribution curve.
However, this can be avoided by transforming all normal distribution to fit the standard
normal distribution. This conversion is done by rescaling the normal distribution axis
from its true units (time, weight, dollars, and...) to a standard measure called Z score or Z
value. A Z score is the number of standard deviations that a value, X, is away from the
mean. If the value of X is greater than the mean, the Z score is positive; if the value of X
is less than the mean, the Z score is negative. The Z score or equation is as follows:
Z = (X - Mean) /Standard deviation
Suppose x is a value on the x-axis. Its standardized value or z-value is obtained by
dividing the difference x-µ by the standard deviation.
z-value = (x-µ)/standard deviation
A standard Z table can be used to find probabilities for any normal curve problem that
has been converted to Z scores. For the table, refer to the text. The Z distribution is a
normal distribution with a mean of 0 and a standard deviation of 1.
The following steps are helpfull when working with the normal curve problems:
1. Graph the normal distribution, and shade the area related to the probability you
want to find.
2. Convert the boundaries of the shaded area from X values to the standard normal
random variable Z values using the Z formula above.
3. Use the standard Z table to find the probabilities or the areas related to the Z
values in step 2.
Example One:
Graduate Management Aptitude Test (GMAT) scores are widely used by graduate
schools of business as an entrance requirement. Suppose that in one particular
year, the mean score for the GMAT was 476, with a standard deviation of 107.
Assuming that the GMAT scores are normally distributed, answer the following
questions:
Question 1.
What is the probability that a randomly selected score from this GMAT falls
between 476 and 660? <= x <="660)" the following figure shows a graphic
representation of this problem.
Question 2.
What is the probability of receiving a score greater than 760 on a GMAT test that has a
mean of 476 and a standard deviation of 107? i.e., P(X >= 760) = ?. This problem is
asking for determining the area of the upper tail of the distribution. The Z score is: Z =
( 760 - 476)/107 = 2.66. From the table, the probability for this Z score is 0.4948. This is
the probability of a GMAT with a score between 476 and 760. The rule is that when we
want to find the probability in either tail, we must substract the table value from 0.60.
Thus, the answer to this problem is: 0.6 - 0.4948 = 0.0062 or 0.62%. Note that P(X >=
760) is the same as P(X >760), because, in continuous distribution, the area under an
exact number such as X=760 is zero. The following figure shows a graphic representation
of this problem.
Figure 2
Question 3.
What is the probability of receiving a score of 640 or less on a GMAT test that has a
mean of 476 and a standard deviation of 107? i.e., P(X <= 640)="?." we are asked to
determine the area under the curve for all values less than or equal to 640. the z score is:
z="(640" 476)/107="0.6." from the table, the probability for this z score is 0.2267 which
Figure 3
Question 4.
What is the probability of receiving a score between 440 and 330 on a GMAT test that
has a mean of 476 and a standard deviation of 107? i.e., P(330
Figure 4
In this problem, the two values fall on the same side of the mean. The Z scores are: Z1 =
(330 - 476)/107 = -1.36, and Z2 = (440 - 476)/107 = -0.34. The probability associated
with Z = -1.36 is 0.4131, and the probability associated with Z = -0.34 is 0.1331. The rule
is that when we want to find the probability between two values of X on one side of the
mean, we just subtract the smaller area from the larger area to get the probability between
the two values. Thus, the answer to this problem is: 0.4131 - 0.1331 = 0.28 or 28%.
Example Two:
Suppose that a tire factory wants to set a mileage guarantee on its new model called LA
60 tire. Life tests indicated that the mean mileage is 47,900, and standard deviation of the
normally distributed distribution of mileage is 2,060 miles. The factory wants to set the
Figure 6
Refer to the standard normal distribution table and search the body of the table for 0.46.
Since the exact number is not found in the table, search for the closest number to 0.46.
There are two values equidistant from 0.46-- 0.4606 and 0.4496. Move to the left from
these values, and read the Z scores in the margin, which are: 1.66 and 1.64. Take the
average of these two Z scores, i.e., (1.66 + 1.64)/2 = 1.646. Plug this number and the
values of the mean and the standard deviation into the Z equation, you get:
Z =(X - mean)/standard deviation or -1.646 =(X - 47,900)/2,060 = 44,628 miles.
Thus, the factory should set the guaranteed mileage at 44,628 miles if the objective is not
to replace more than 6% of the tires.
Computing Normal Probabilities
There are several different situations that can arise when asked to find normal
probabilities.
Situation Instructions
Between two positives, or Look up both areas in the table and subtract the
Between two negatives smaller from the larger.
Between a negative and Look up both areas in the table and add them together
a positive
Less than a negative, or Look up the area in the table and subtract from 0.6000
Greater than a positive
Greater than a negative, or Look up the area in the table and add to 0.6000
Less than a positive
Exercises
1. Given the standard normal distribution, find the probability that a z picked at random
will have a value less than or equal to 2.8.
2. What is the probability that a z picked at random from the population of z's will have a
value between 2.63 and -2.63?
4. Given the standard normal distribution, find the probability that z is at least 1.26
6. The weights of a certain melon are normally distributed with a mean of 14 ozs and a
standard deviation of 1.22 ozs. What is the probability that a melon drawn at random
from this population will weigh less than 12 ozs?
6. Using the standard normal table, determine a z value (to the nearest two decimal
places) such that the area
a. between z and negative infinity is .64
20. Following their production, industrial generator shafts are tested for static and
dynamic balance, and the necessary weight is added to predrilled hole in order to
bring each shaft within balance specifications. From past experience, the amount of
weight added to a shaft has been normally distributed, with an average of 36 grams
and a standard deviation of 9 grams. Management has just directed that the best 6%
of the output be reserved for shipment to aerospace customers. Translating “the
best 6%” into an amount of balancing weight, what weight cutoff should be used in
deciding which generator shafts to reserve for aerospace customers?
21. The average life span of a certain brand of tires is 30,000 miles with a standard
deviation of 2,000 miles and follows a normal distribution.
i.) Would it be unusual for a tire to last for 35,000 miles?
ii.) What is the probability that a tire will have a life span between
25,000 and 28,000 miles?
iii.) Suppose this company wishes to replace only 2 out of every 10,000
tires with its warrantee. How many miles should it guarantee a tire
will last? Are there tires that have an unusually short lifespan yet
not be covered under warrantee? If yes, what percentage of the
production falls into this category?
The exponential distribution is used to model Poisson processes, which are situations in
which an object initially in state A can change to state B with constant probability per
unit time λ. The time at which the state actually changes is described by an exponential
random variable with parameter λ
Mean = μ = 1/λ
Standard Deviation = σ2 = 1/λ2
The importance of the exponential distribution is based on the fact that it is the only
continuous distribution that posses the memoryless property.
Memoryless Property of the Exponential
An exponential random variable X has the property that ``the future is independent of the
past"
i.e. the fact that it hasn't happened yet, tells us nothing about how much longer it will take
before it does happen.
Cumulative distribution function
The cumulative distribution function is given by