Probability distribution of a random variable is: P(x = 3) ... Chapter 5: Discrete
Random Variables ... The following table displays a frequency distribution for the.
Discrete Random Variables Definitions Random Variable A random variable is a numerical quantity whose value depends on chance.
Discrete Random Variable A discrete random variable is a random variable whose possible values form a countable (finite) set. That is, the values are integers.
NOTATION Random variables are denoted by: x, y, & z Events are denoted as: {x = 3} Probability of the event is denoted as: P(x = 3) Probability Distribution Facts • Probability distribution of a random variable is: P(x = 3) = f/N • The sum of the probabilities of any discrete random variable is always equal to 1. • The probabilities are equal to the relative frequency.
Example: The National Center for Education Statistics compiles enrollment data on US public schools and reports the information in Digest of Education Statistics. The following table displays a frequency distribution for the enrollment by grade in public secondary schools. Frequencies are in thousands of students. Grade
Frequency
9 10 11 12 TOTAL
3290 3223 3041 2908 12462
Rel. Frequency / Probability 0.264 0.259 0.244 0.233 1.000
a) The possible values of the random variable x are: x = 9, 10, 11, 12 b) The random variable notation for the event that the student chosen is in the tenth grade is: {x = 10} c) The probability of a student chosen is in the tenth grade is: P (x = 10) = 3223 / 12462 = 0.259 That is, 25.9% of the students in the public secondary schools are in the tenth grade. d) P(12) = 2908/ 12462 = 0.233 e) The probability histogram of the random variable x is: Histogram
0.2
0.1
0 0
1
2
3
Chapter 5: Discrete Random Variables th Class Notes to accompany: Introductory Statistics, 9 Ed, By Neil A. Weiss Prepared by: Nina Kajiji
4
Page -2-
Mean of a Discrete Random Variable The mean of a DRV, x, is defined by: µx = ΣxP(x) = Σx(f/N) Mean is also referred to as EXPECTED or EXPECTATION.
Standard Deviation of a Discrete Random Variable Standard deviation measures the dispersion of the possible values of the random variable relative to its mean. Recall: 2 σ 2 = {Σ (x - µ) f } / N
But: f / N is the P(x) Therefore:
2 σ 2 = Σ (x - µ ) P(x)
If the above formula was to be rewritten for any random variable x the notation is as follows: 2 σ 2x = Σ (x - µx) P(x) σ = σ 2x
The shortcut formula is: 2 2 σ 2x = Σx P(x) - µ x
σ = σ 2x
Example The random variable x is the grade level of a secondary school student selected at random. Its probability distribution is as given in the first two columns. Compute the mean and standard deviation of x.
(x) 9 10 11 12
Probability P(x) 0.264 0.259 0.244 0.233 Sum Mean
xP(x)
Short cut Formula 2 x x2P(x)
Standard Formula (x-µ)
(x-µ)2 (x-µ)2P(x)
2.376 81 21.384 -1.446 2.091 2.590 100 25.900 -0.446 0.199 2.684 121 29.524 0.554 0.307 2.796 144 33.552 1.554 2.415 10.446 110.36 Var 10.446 Std
0.552 0.052 0.075 0.563 1.241 1.114
Using the shortcut formula the variance is: 2 σ 2x = Σx2P(x) - µ x = 110.36 - (10.446)2 = 1.241
Chapter 5: Discrete Random Variables th Class Notes to accompany: Introductory Statistics, 9 Ed, By Neil A. Weiss Prepared by: Nina Kajiji
Page -4-
The Discrete Uniform Distribution • Simplest of all probability distributions. • Each value of the random variable is assigned identical probabilities. • When there is little or no information concerning the outcome of a random variable, the discrete uniform distribution may be a reasonable initial alternative. Example: Experiment: Throw of a single dice. If the dice is “fair”, then each of the outcomes is equally likely. The probabilities are listed below: X P(X= x) 1 1/6 2 1/6 3 1/6 4 1/6 5 1/6 6 1/6
Chapter 5: Discrete Random Variables th Class Notes to accompany: Introductory Statistics, 9 Ed, By Neil A. Weiss Prepared by: Nina Kajiji
Page -5-
Repeated Trials Each repetition of an experiment is called a trial. To analyze repeated experiments with two possible outcomes requires that you understand the concept of: * * * *
Factorials Binomial coefficients Bernoulli trials Binomial distribution
Binomial Coefficients If n is a positive integer and x is a nonnegative integer less than or equal to n, then we define the binomial coefficients as follows: n x
=
n! x!(n - x)!
Bernoulli Trials Repeated identical trials are called Bernoulli trials if: 1) There are two possible outcomes for each trial: s (for success); and f (for failure). 2) The trials are independent 3) The probability of success (p) remains the same from trial to trial. Chapter 5: Discrete Random Variables th Class Notes to accompany: Introductory Statistics, 9 Ed, By Neil A. Weiss Prepared by: Nina Kajiji
Page -6-
Binomial Distribution The Binomial Distribution is a probability distribution for the number of successes on any of the n trials in a sequence of Bernoulli trials. The binomial probability formula is specified below: P(x) = Where: x = n = P(x) = p = (1-p)=
n x p (1-p)n-x x
Discrete random variable # of trials. probability distribution of random variable x. the probability of success on any given trial the probability of failure on any given trial
Chapter 5: Discrete Random Variables th Class Notes to accompany: Introductory Statistics, 9 Ed, By Neil A. Weiss Prepared by: Nina Kajiji
Page -7-
Example To Demonstrate Bernoulli Trials Recall: Seat belt Experiment The experiment satisfies the conditions of a Bernoulli Trial. That is, 1) This was a repeated trials experiment. The number of trials was 3. 2) There are two possible outcomes -- Y or N. Where Y is synonymous to success and N is synonymous to failure. 3) The trials are independent. That is the first person's response has no bearing on the second or third persons' response. 4) The probability of success remained the same from trial to trial. That is, probability of Y was 0.2 for every trial.
Chapter 5: Discrete Random Variables th Class Notes to accompany: Introductory Statistics, 9 Ed, By Neil A. Weiss Prepared by: Nina Kajiji
Page -8-
Example To Demonstrate Binomial Distribution Recall in the seat belt example the probability of each of the following events was: A. Exactly zero successes = {NNN} = 0.512 B. Exactly one success = {YNN,NYN,NNY} = 3*0.128 = 0.384 C. Exactly two successes = {YYN,YNY,NYY} = 3*0.032 = 0.096 D. Exactly three successes = {YYY} = 0.008 Therefore, the binomial distribution is: #of X x 0 1 2 3
Probability P(x) 0.512 0.384 0.096 0.008
The probability x equal to a number can also be easily calculated using the binomial probability formula. For example, if we wanted to know P(x=2) then using the formula: 3 2 n x n-x 3-2 = = 0.096 P(x=2) = p (1-p) 0.2 (1-0.2) 2 x
Chapter 5: Discrete Random Variables th Class Notes to accompany: Introductory Statistics, 9 Ed, By Neil A. Weiss Prepared by: Nina Kajiji
Page -9-
Mean of a Binomial Random Variable Suppose that x has a binomial distribution with parameters n and p. The mean of the random variable x can be obtained from the formula: µx =
np
eq. 1
µx =
ΣxP(x)
eq. 2
-or-
For the seat belt example: Using eq. 1 with n=3; p=0.2 µx = (3)(0.2) = 0.6 Using eq. 2 and the probability distribution µx = (0)(0.512) + (1)(0.384) + (2)(0.096) + (3)(0.008) = 0.6
For the class work problem: Using eq. 1 with n=3; p=0.487 µx = (3)(0.487) = 1.461 Using eq. 2 and the probability distribution µx = (0)(0.135) + (1)(0.384) + (2)(0.366) + (3)(0.115) = 1.461 Chapter 5: Discrete Random Variables th Class Notes to accompany: Introductory Statistics, 9 Ed, By Neil A. Weiss Prepared by: Nina Kajiji
Page -10-
Standard Deviation of a Binomial Random Variable Suppose that x has the binomial distribution with parameters n and p. Then the standard deviation (STD) of the random variable x can be obtained from the formula: σx =
Sqrt(np(1-p))
eq. 3
σx =
Sqrt(Σx2P(x) - µ2)
eq. 4
-or-
For the seatbelt example: Using eq. 3 with n=3 and p=0.2 σx = Sqrt(3(0.2)(1-0.2)) = Sqrt(0.480) = 0.693 Using eq. 4
Totals
x 0 1 2 3 6
σx = = =
x2 0 1 4 9 14
P(x) 0.512 0.384 0.096 0.008 1.000
x2P(x) 0.000 0.384 0.384 0.072 0.840
2
Sqrt(0.840 - 0.6 ) Sqrt(0.480) 0.693
Chapter 5: Discrete Random Variables th Class Notes to accompany: Introductory Statistics, 9 Ed, By Neil A. Weiss Prepared by: Nina Kajiji
Page -11-
Standard Deviation: Using eq. 3 with n=3 and p=0.487 σx = Sqrt(3(0.487)(1-0.487)) = Sqrt(0.749) = 0.866 Using eq. 4
Totals
σx = = =
x 0 1 2 3 6
x2 0 1 4 9 14
x2P(x) 0.000 0.384 1.464 1.035 2.883
P(x) 0.135 0.384 0.366 0.115 1.000 2
Sqrt(2.883 - 1.461 ) Sqrt(0.748) 0.865
Chapter 5: Discrete Random Variables th Class Notes to accompany: Introductory Statistics, 9 Ed, By Neil A. Weiss Prepared by: Nina Kajiji
Page -12-
The Poisson Distribution (Read) Similar to Binomial in that the random variable represents a count of the total number of successes. However, a Poisson distribution does not have a fixed number of trials. Instead uses a fixed interval of time or space in which the number of successes are recorded. Examples: • The number of airplane crashes • The number of car accidents • The number of customers arriving at a ATM (waiting lines / queuing problems) • The number of defective bulbs in a batch To qualify as a Poisson random variable an experiment must meet two conditions: a) Successes occur one at a time b) The occurrence of a success in any interval is independent of the occurrence of a success in any other interval. The Probability Distribution: P(X=x) = (e-λλx) / x! Where:
λ
Mean:
λ
for x=0,1,2,…,
= average number of successes Standard Deviation: Sqrt(λ)
Chapter 5: Discrete Random Variables th Class Notes to accompany: Introductory Statistics, 9 Ed, By Neil A. Weiss Prepared by: Nina Kajiji
Page -13-
Poisson Approximation to the Binomial Distribution Steps: 1. Determine n, the number of trials, and p, the probability of success. 2. Check that n ≥ 100 and np ≤ 10. If they are not, the Poisson approximation should not be used. 3. Use the Poisson probabilty formula with λ= np Example: Find P(X=0) given n=500 p=0.0033. 1. Notice n ≥ 100 and np ≤ 10 2. Then, P( x) = e P( x) = e
x ( ) np − np
x! −1.65
(1.65)0 0!
P(x) = 0.192
Chapter 5: Discrete Random Variables th Class Notes to accompany: Introductory Statistics, 9 Ed, By Neil A. Weiss Prepared by: Nina Kajiji
Page -14-
The Hypergeometric Distribution (Read) • Similar to Binomial in that the random variable has only two outcomes on each trial of the experiment. • Both count the number of successes in n trials • Differs from the Binomial in that the trials are not independent. This implies that the probability of success will vary between trials. • The population of a hypergeometric random variable in finite and the total number of successes and failures are known. Example: A binomial experiment of counting the number of red cards drawn in 8 draws from a deck with replacement, can easily be modified to a hypergeometric by not replacing the cards. The is the probability of drawing a red card on the first draw in 26/52 or 0.5. If a red card is drawn on the first draw and not replaced, the probability of drawing a red card on the next draw is slightly less (25/51).
Chapter 5: Discrete Random Variables th Class Notes to accompany: Introductory Statistics, 9 Ed, By Neil A. Weiss Prepared by: Nina Kajiji
Page -15-
The Probability Distribution: A N − A x n x − P(X=x) = N n
0 ≤ x ≤ min(A,n)
Where: A N n
= the total number of successes possible = population size = sample size
Mean:
n
Variance:
n
A N
A A N − n 1 − N N N − 1
Chapter 5: Discrete Random Variables th Class Notes to accompany: Introductory Statistics, 9 Ed, By Neil A. Weiss Prepared by: Nina Kajiji
Page -16-