Upload
mrfrederick87
View
224
Download
0
Embed Size (px)
Citation preview
7/28/2019 Lecture 06. Discrete Random Variables
1/27
Statistics
1
ST 361: Statistics for EngineersDiscrete Random Variables
Kimberly Weems
5260 SAS Hall
7/28/2019 Lecture 06. Discrete Random Variables
2/27
Statistics
Random Variables
Motivating Ex.: Assume that all mens basketball teams playingthis season are equally strong. We are interested in the number
of points scored by NC State in each game.
Before each game, we know the population of possible values.
Each value occurs with some probability. However, we do not know what will be the number of points
scored by NC State during the next game.
The outcome is random, hence a random variable.
7/28/2019 Lecture 06. Discrete Random Variables
3/27
Statistics
Random Variables
Ex: in an experiment to measure the speed of light, theinaccuracies of the measurement process make the potential
population of measurements infinite, yet the observer must settle
for a finite sample of measurements.
7/28/2019 Lecture 06. Discrete Random Variables
4/27
Statistics
Random Variables
Ex: The possible outcomes are 1,2,3,4,5,and 6. The outcomes
can be equally likely (die is perfect cube), but cannot say
what will come up. As before, the outcome is random.
A variable that associates a number with the outcome of a
random experiment is called a random variable.
Formal defn: A random variable (rv) = a function that assigns
a real number to each outcome in the sample space of a
random experiment.
4
7/28/2019 Lecture 06. Discrete Random Variables
5/27
Statistics
Continuous & Discrete Random Variables
A discrete random variable is a random variable with a finite(or countably infinite) range. They are usually integer counts,
e.g., number of errors or number of bit errors per 100,000
transmitted (rate).
A continuous random variable is a random variable with an
interval (either finite or infinite) of real numbers for its range.
Its precision depends on the measuring instrument.
5
7/28/2019 Lecture 06. Discrete Random Variables
6/27
7/28/2019 Lecture 06. Discrete Random Variables
7/27
Statistics
Example: Voice Lines
A voice communication system for a business contains 48external lines. At a particular time, the system is observed,
and some of the lines are being used.
LetXdenote the number of lines in use.Then,Xcan assume any of the integer values 0 through 48.
The system is observed at a random point in time. If 10 lines
are in use, thenx = 10.
7
7/28/2019 Lecture 06. Discrete Random Variables
8/27
Statistics
Probability Distributions
Recall: A random variableXassociates the outcomes of a
random experiment to a number on the number line.
The probability distribution of the random variableXis a
description of the probabilities with the possible numerical
values ofX.
A probability distribution of a discrete random variable can be:
1. A list of the possible values along with their probabilities.
2. A formula that is used to calculate the probability inresponse to an input of the random variables value.
8
7/28/2019 Lecture 06. Discrete Random Variables
9/27
Statistics
Probability mass function
The probability distribution of a discrete random variable is
called a probability mass function (pmf).
Gives as a list of values along with their probabilities:
Representation (for discrete with finite number of values):
Value of X x1 x2 .. . xn
Probability p(x1) p(x2) . . p(xn)
7/28/2019 Lecture 06. Discrete Random Variables
10/27
Statistics
Probability distribution of a discrete
random variable
A Probability Mass Function satisfies
For all valuesx:
We have:
To give a probability mass function, specify the values
and their correspondingprobabilities.
( ) ( )p x P X x
0 ( ) 1p x
( ) 1x
p x
7/28/2019 Lecture 06. Discrete Random Variables
11/27
Statistics
Cumulative Distribution Function
The cumulative distribution function is built from the probability
mass function (and vice versa).
11
The cumulative distribution function of a discrete random variable ,
denoted as ( ), is:
(1)
(2) 0 1
(3) If , then
i
i
x x
X
F x
F x P X x p x
F x
x y F x F y
7/28/2019 Lecture 06. Discrete Random Variables
12/27
Statistics
Summary Numbers of a Probability
Distribution The mean is a measure of the centerof a probability
distribution.
The variance is a measure of the dispersion or variability of a
probability distribution.
The standard deviation is anothermeasure of the dispersion. It
is the positive square root of the variance.
12
7/28/2019 Lecture 06. Discrete Random Variables
13/27
Statistics
Mean Defined
13
The or of the discrete random variable X,denoted as or
mean expected, isvalue
x
E X
E X x p x
The mean is the weighted average of the possible values ofX,
the weight of each valuex represents how likely the occurrence
of value x is. It represents the center of the distribution. It is
also called the arithmetic mean.
Ex. Ifp(x) is the pmf representing the loading on a long, thin
beam, thenE(X) is the fulcrum or point of balance for the beam.
7/28/2019 Lecture 06. Discrete Random Variables
14/27
Statistics
Variance Defined
14
2
2 22 2 2
The of X, denoted as or , isvariance
x x
V X
V X E X x p x x p x
The variance is the measure of dispersion or scatter in the
possible values forX.It is the average of the squared deviations from the distribution
mean.
7/28/2019 Lecture 06. Discrete Random Variables
15/27
Statistics
Variance Defined
15
The mean is the balance point. Distributions (a) & (b) have
equal mean, but (a) has a larger variance.
7/28/2019 Lecture 06. Discrete Random Variables
16/27
Statistics
Variance Formula Derivations
16
2
2 2
2 2
2 2 2
2 2
is the formula
2
2
2
is the form
definitional
computatio ull ana
x
x
x x
x
x
V X x p x
x x p x
x p x xp x p x
x p x
x p x
The computational formula is easier to calculate manually.
7/28/2019 Lecture 06. Discrete Random Variables
17/27
Statistics
Ex. Digital Channel
There is a chance that a bit transmitted through a digital transmission
channel is an error. Xis the number of bits received in error of the next 4transmitted. Use table to calculate the mean & variance.
17
x p(x) x*p(x) (x-0.4)2 (x-0.4)2*p(x) x2*p(x)
0 0.6561 0.0000 0.160 0.1050 0.0000
1 0.2916 0.2916 0.360 0.1050 0.2916
2 0.0486 0.0972 2.560 0.1244 0.1944
3 0.0036 0.0108 6.760 0.0243 0.0324
4 0.0001 0.0004 12.960 0.0013 0.0016Totals = 0.4000 0.3600 0.5200
= Mean = Variance (2) = E(x
2)
= 2
= E(x2) -
2= 0.3600
Definitional formula
Computational formula
7/28/2019 Lecture 06. Discrete Random Variables
18/27
Statistics
Particular class of Discrete Random
Variables1. Flip a coin 10 times. X= # heads obtained.
2. A worn tool produces 1% defective parts. X= # defective
parts in the next 25 parts produced.
3. A multiple-choice test contains 10 questions, each with 4
choices, and you guess. X= # of correct answers.
4. Of the next 20 births, letX= # females.
5. Assume your favorite basketball team plays 10 games (of
equal difficulty). Let X = the number of times that it wins the
game.
7/28/2019 Lecture 06. Discrete Random Variables
19/27
Statistics
Binomial Random Variables
These examples are binomial experiments having the following
characteristics:
1. Fixed number of trials (n).
2. Each trial is termed a success (S) or failure (F). Xis the # of
successes.
3. The probability of success in each trial is constant (p).
4. The outcomes of successive trials are independent.
7/28/2019 Lecture 06. Discrete Random Variables
20/27
Statistics
Binomial distribution
Commonly used discrete distribution
Bernoulli trial [definition]
Single trial with only 2 possible outcome (S or F)
The probability of success is p.
Binomial variable
Considern Bernoulli independent trials
Each trial has the same probability of successp
Xcounts the number of successes in these ntrials.
( , )X Bin n p
( )X Bernoulli p
7/28/2019 Lecture 06. Discrete Random Variables
21/27
Statistics
Binomial distribution
The probability mass function of X is:
Lets calculate pk=Pr(X=k), and k=0,1,n[Recall that X counts the number of successes in n trials ]
1) probability of an outcome comprised of k successes and (n-k)
failures
.
Value of X 0 1 .. . n
Probability p0 p1 . . pn
, , ..., , , ...,
k n k
S S S F F F
7/28/2019 Lecture 06. Discrete Random Variables
22/27
Statistics
Binomial distribution
The probability mass function of X is:
Lets calculate pk=Pr(X=k), and k=0,1,n[Recall that X counts the number of successes in n trials ]
1) probability of an outcome comprised of k success and (n-k)
failures
2) the number of such outcomes:
.
Value of X 0 1 .. . n
Probability p0 p1 . . pn
(1 )k n kp p
!
!( )!
nn
kk n k
7/28/2019 Lecture 06. Discrete Random Variables
23/27
Statistics
Binomial distribution
Lets calculate pk=Pr(X=k), and k=0,1,n
[Recall that X counts the number of successes in n trials ]
1) probability of an outcome comprised of k success and (n-k)
failures
2) the number of such outcomes:
The Binomial PMF is:
(1 )k n kp p
!!( )!
nnkk n k
( ) (1 )k n kk np P X k p pk
7/28/2019 Lecture 06. Discrete Random Variables
24/27
Statistics
Factorials
0!=1
1!=1
2!=1X2=2
3!=1X2X3=6
4!=1X2X3X4=245!=1X2X3X4X5=120
General formula :
[this formula is helpful for canceling]
! ( 1)!n n n
7/28/2019 Lecture 06. Discrete Random Variables
25/27
Statistics
Example 3-16: Digital Channel
The chance that a bit transmitted through a digital transmission
channel is received in error is 0.1. Assume that the transmission
trials are independent. LetX= the number of bits in error in the
next 4 bits transmitted. FindP(X=2).
7/28/2019 Lecture 06. Discrete Random Variables
26/27
Statistics
Example 3-16: Digital Channel
Let E denote a bit in error
Let O denote an OK bit.
Sample space &x listed in table.
6 outcomes wherex = 2.
Prob of each is 0.12*0.92 = 0.0081
P(X=2) = 6*0.0081 = 0.0486
Outcome x Outcome x
OOOO 0 EOOO 1
OOOE 1 EOOE 2
OOEO 1 EOEO 2
OOEE 2 EOEE 3
OEOO 1 EEOO 2
OEOE 2 EEOE 3
OEEO 2 EEEO 3
OEEE 3 EEEE 4 2 24
2 0.1 0.92
P X
7/28/2019 Lecture 06. Discrete Random Variables
27/27
Statistics
Mean/Variance of the Binomial RV
IfXhas aBin(n,p) distribution, the probability mass functionofXis given by
fork = 0,1,2,,n
The Mean and Variance ofXare:
X = np , and 2
X = np(1-p)
Example: X has Bin(5, 0.6) distribution.
Then the mean is X = 50.6 = 3 ;
the variance is 2X = 5 0.60.4 = 1.2
1n kk
nP X k p p
k