5.8. The normal distribution 5.9. Summary
5.10. Exercises
5.1 Random variables
One of the fundamental concepts of probability theory is that of a random variable.
Definition 5.1
A random variable is a variable that assumes numerical values associated with events of an experiment.
Example 5.1 Observe 100 babies to be born in a clinic. The number of boys, which have been born, is a random variable. It may take values from 0 to 100.
Example 5.2 Number of patients of a clinic daily is a random variable.
Example 5.3 Select one student from an university and measure his/her height and record this height by x. Then x is a random variable, assuming values from, say from 100 cm to 250 cm in dependence upon each specific student.
Example 5.4 The weight of babies at birth also is a random variable. It can assume values in the interval, for example, from 800 grams to 6000 grams.
Classification of random variables: Random variables may be divided into two types:
discrete random variables and continuous random variables.
Definition 5.2
A discrete random variable is one that can assume only a countable number of values.
A continuous random variable can assume any value in one or more intervals on a line.
Among the random variables described above the number of boys in Example 5.1 and the number of patients in Example 5.2 are discrete random variables, the height of students and the weight of babies are continuous random variables.
Example 5.5 Suppose you randomly select a student attending your university. Classify each of the following random variables as discrete or continuous:
a) Number of credit hours taken by the student this semester b) Current grade point average of the student.
Solution a) 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.5678, 15.3456 and 12.9876 hours.
b) The grade point average for the student is a continuous random variable because it could theoretically assume any value (for example, 5.455, 8.986) corresponding to the points on the interval from 0 to 10 of a line.
5.2 The probability distribution for a discrete random variable
Definition 5.3
The probability distribution for a discrete random variable x is a table, graph, or formula that gives the probability of observing each value of x. We shall denote the probability of x by the symbol p(x).
Thus, the probability distribution for a discrete random variable x may be given by one of the ways:
1. the table
x p
x1 p1
x2 p2
... ...
xn pn
where pk is the probability that the variable x assume the value xk (k = 1, 2,..., n).
2. a formula for calculating p(xk) (k = 1, 2,..., n).
3. a graph presenting the probability of each value xk .
Example 5.6 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 5.1.
Table 5.1 Simple events of the experiment of tossing a coin twice
SIMPLE EVENT DESCRIPTION PROBABILITY NUMBER OF HEADS
E1 H1H2 0.25 2
E2 H1T2 0.25 1
E3 T1H2 0.25 1
E4 T1T2 0.25 0
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.
The probability distribution p(x) is displayed in tabular form in Table 5.2 and as a probability histogram in Figure 5.1.
Table 5.2 Probability distribution for x, the number of heads in two tosses of a coin
x p(x)
0 0.25
1 0.5
2 0.25
0 0.1 0.2 0.3 0.4 0.5 0.6
0 1 2
Figure 5.1 Probability distribution for x, the number of heads in two tosses of a coin
Properties of the probability distribution for a discrete random variable x 1. 0≤ p(x)≤1
2.
∑
=x all
p(x) 1
Relationship between the probability distribution for a discrete random variable and the relative frequency distribution of data:
Suppose you were to toss two coins over and over again a very large number of times and record the number x of heads for each toss. A relative frequency distribution for the resulting collection of 0’s, 1’s and 2’s would be very similar to the probability distribution shown in Figure 5.1. In fact, if it were possible to repeat the experiment an infinitely large number of times, the two distributions would be almost identical.
Thus, the probability distribution of Figure 5.1 provides a model for a conceptual population of values x – the values of x that would be observed if the experiment were to be repeated an infinitely large number of times.
5.3 Numerical characteristics of a discrete random variable
5.3.1 Mean or expected value
Since a probability distribution for a random variable x is a model for a population relative frequency distribution, we can describe it with numerical descriptive measures, such as its mean and standard deviation, and we can use Chebyshev theorem to identify improbable values of x.
The expected value (or mean) of a random variable x, denoted by the symbol E(x), is defined as follows:
Definition 5.4
Let x be a discrete random variable with probability distribution p(x). Then the mean or expected value of x is distribution for the random variable x, shown in Figure 5.1. Demonstrate that the formula for E(x) gives the mean of the probability distribution for the discrete random variable x.
Solution If we were to repeat the two-coin tossing experiment a large number of times – say
5.3.2 Variance and standard deviation
The second important numerical characteristics of random variable are its variance and standard deviation, which are defined as follows:
Definition 5.6
The standard deviation of x is the positive square root of the variance of x:
σ
2σ
=Example 5.7 Refer to the two-coin tossing experiment and the probability distribution for x, shown in Figure 5.1. Find the variance and standard deviation of x.
Solution In Example 5.6 we found the mean of x is 1. Then
5.4 The binomial probability distribution
Many real-life experiments are analogous to tossing an unbalanced coin a number n of times.
Example 5.8 Suppose that 80% of the jobs submitted to a data-processing center are of a statistical nature. Then selecting a random sample of 10 submitted jobs would be analogous to tossing an unbalanced coin 10 times, with the probability of observing a head (drawing a statistical job) on a single trial equal to 0.80.
Example 5.9 Test for impurities commonly found in drinking water from private wells showed that 30% of all wells in a particular country have impurity A. If 20 wells are selected at random then it would be analogous to tossing an unbalanced coin 20 times, with the probability of observing a head (selecting a well with impurity A) on a single trial equal to 0.30.
Example 5.10 Public opinion or consumer preference polls that elicit one of two responses – Yes or No, Approve or Disapprove,... are also analogous to the unbalanced coin tossing experiment if the size N of the population is large and the size n of the sample is relatively small.
All these experiments are particular examples of a binomial experiment known as a Bernoulli process, after the seventeenth-century Swiss mathematician, Jacob Bernoulli. Such experiments and the resulting binomial random variables have the following characteristics, which form the model of a binomial random variable.
Model (or characteristics) of a binomial random variable 1. The experiment consists of n identical trials
2. There are only 2 possible outcomes on each trial. We will denote one outcome by S (for Success) and the other by F (for Failure).
3. The probability of S remains the same from trial to trial. This probability will be denoted by p, and the probability of F will be denoted by q ( q = 1-p).
4. The trials are independent.
5. The binomial random variable x is the number of S’ in n trials.
The binomial probability distribution, its mean and its standard deviation are given the following formulas:
The probability distribution, mean and variance for a binomial random variable:
1. The probability distribution:
x n x x
n
p q
C
p(x) =
− (x = 0, 1, 2, ..., n), wherep = probability of a success on a single trial, q=1-p n = number of trials, x= number of successes in n trials
x!(n-x)!
Cnx = n! = combination of x from n.
2. The mean:
µ = np
3. The variance:
σ
2= npq
Example 5.11 (see also Example 5.9) Test for impurities commonly found in drinking water from private wells showed that 30% of all wells in a particular country have impurity A. If a random sample of 5 wells is selected from the large number of wells in the country, what is the probability that:
a) Exactly 3 will have impurity A?
b) At least 3?
c) Fewer than 3?
Solution First we confirm that this experiment possesses the characteristics of a binomial experiment. This experiment consists of n = 5 trials, one corresponding to each random selected well. Each trial results in an S (the well contains impurity A) or an F (the well does not contain impurity A). Since the total number of wells in the country is large, the probability of
drawing a single well and finding that it contains impurity A is equal to 0.30 and this probability will remain the same for each of the 5 selected wells. Further, since the sampling is random, we assume that the outcome on any one well is unaffected by the outcome of any other and that the trials are independent. Finally, we are interested in the number x of wells in the sample of n
= 5 that contain impurity A. Therefore, the sampling process represents a binomial experiment with n = 5 and p = 0.30.
a) The probability of drawing exactly x = 3 wells containing impurity A is
x n x x
n
p q
C
p(x) =
− with n = 5, p = 0.30 and x = 3. We have by this formula1323 0 30
0 1 30 2 0 3
3 5 ( . )3( . )5 3 .
!
! ) !
p( = − − = .
b) The probability of observing at least 3 wells containing impurity A is
P(x ≥3) = p(3)+p(4)+p(5). We have calculated p(3) = 0.1323 and we leave to the reader to verify that p(4) = 0.02835, p(5) = 0.00243. In result, P(3) = 0.1323+0.02835+0.00243 = 0.16380.
c) Although P(x<3) = p(0)+p(1)+p(2), we can avoid calculating 3 probabilities by using the complementary relationship P(x<3) = 1-P(x ≥ 3) = 1-0.16380 = 0.83692.
5.5 The Poisson distribution
The Poisson probability distribution is named for the French mathematician S.D. Poisson (1871-1840, It is used to describe a number of processes, including the distribution of telephone calls going through a switchboard system, the demand of patients for service at a health institution, the arrivals of trucks and cars at a tollbooth, and the number of accidents at an intersection.
Characteristics defining a Poisson random variable
1. The experiment consists of counting the number x of times a particular event occurs during a given unit of time
2. The probability that an event occurs in a given unit of time is the same for all units.
3. The number of events that occur in one unit of time is independent of the number that occur in other units.
4. The mean number of events in each unit will be denoted by the Greek letter λ
The formulas for the probability distribution, the mean and the variance of a Poisson random variable are shown in the next box.
The probability distribution, mean and variance for a Poisson random variable x:
1. The probability distribution:
x!
p(x) e
x λ
λ −
= ( x = 0, 1, 2,...),
where
λ= mean number of events during the given time period, e = 2.71828...(the base of natural logarithm).
2. The mean:
µ
=λ
3. The variance:
σ
2= λ
Note that instead of time, the Poisson random variable may be considered in the experiment of counting the number x of times a particular event occurs during a given unit of area, volume, etc.
Example 5.12 Suppose that we are investigating the safety of a dangerous intersection. Past police records indicate a mean of 5 accidents per month at this intersection. Suppose the number of accidents is distributed according to a Poisson distribution. Calculate the probability in any month of exactly 0, 1, 2, 3 or 4 accidents.
Solution Since the number of accidents is distributed according to a Poisson distribution and the mean number of accidents per month is 5, we have the probability of happening
accidents in any month
! 5 5
x p(x) e
x −
= . By this formula we can calculate p(0) = 0.00674, p(1) = 0.3370, p(2) = 0.08425, p(3) = 0.14042, p(4) = 0.17552.
The probability distribution of the number of accidents per month is presented in Table 5.3 and Figure 5.2.
Table 5.3 Poisson probability distribution of the number of accidents per month
X- NUMBER OF ACCIDENTS
P(X) - PROBABILITY
0 0.006738
1 0.03369
2 0.084224
3 0.140374
4 0.175467
5 0.175467
6 0.146223
7 0.104445
8 0.065278
9 0.036266
10 0.018133
11 0.008242
12 0.003434
Figure 5.2 The Poisson probability distribution of the number of accidents
5.6 Continuous random variables: distribution function and density function
Many random variables observed in real life are not discrete random variables because the number of values they can assume is not countable. In contrast to discrete random variables,
these variables can take on any value within an interval. For example, the daily rainfall at some location, the strength of a steel bar and the intensity of sunlight at a particular time of day. In Section 5.1 these random variables were called continuous random variables.
The distinction between discrete random variables and continuous random variables is usually based on the difference in their cumulative distribution functions.
Definition 5.7
Let ξ be a continuous random variable assuming any value in the interval (-∞, +∞).
Then the cumulative distribution function F(x) of the variable ξ is defined as follows
x) P(
F(x)= ξ ≤
i.e., F(x) is equal to the probability that the variable ξ assumes values, which are less than or equal to x.
Note that here and from now on we denote by letter ξ a continuous random variable and denote by x a point on number line.
From the definition of the cumulative distribution function F(x) it is easy to show the following its properties.
Properties of the cumulative distribution function F(x) for a continuous random variable ξ
1. 0≤F(x)≤1,
2. F(x) is a monotonically non-decreasing function, that is, if a ≤bthenF(a)≤F(b) for any real numbers a and b.
3. P(a≤ξ ≤b)=F(b)−F(a)
4. F(x)→0as x→−∞ and F(x)→1 as x→+∞
In Chapter 2 we described a large data set by means of a relative frequency distribution. If the data represent measurements on a continuous random variable and if the amount of data is very large, we can reduce the width of the class intervals until the distribution appears to be a smooth curve. A probability density is a theoretical model for this distribution.
Definition 5.8
If F(x) is the cumulative distribution function for a continuous random variable ξ then the density probability function f(x) for ξ is
f(x) = F’(x),
i.e., f(x) is the derivative of the distribution function F(x).
The density function for a continuous random variable ξ, the model for some real-life population of data, will usually be a smooth curve as shown in Figure 5.3.
Figure 5.3 Density function f(x) for a continuous random variable
It follows from Definition 5.8 that
∫
∞=
x
-f(t)dt F(x)
Thus, the cumulative area under the curve between -∞ and a point x0 is equal to F(x0).
The density function for a continuous random variable must always satisfy the two properties given in the box.
Properties of a density function 1. f(x)≥0
2. +∞
∫ = ∞ = 1
∞
−