Академический Документы
Профессиональный Документы
Культура Документы
1
ST 361: Statistics for Engineers
Discrete Random Variables
Kimberly Weems
ksweems@ncsu.edu
5260 SAS Hall
Statistics
Random Variables
Motivating Ex.: Assume that all mens basketball teams playing
this 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.
Statistics
Random Variables
Ex: in an experiment to measure the speed of light, the
inaccuracies of the measurement process make the potential
population of measurements infinite, yet the observer must settle
for a finite sample of measurements.
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
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
Statistics
Examples of Discrete & Continuous RVs
Discrete rvs:
Number of scratches on a surface.
Proportion of defective parts among 100 tested.
Number of transmitted bits received in error.
Number of common stock shares traded per day.
Continuous rvs:
Electrical current and voltage.
Physical measurements, e.g., length, weight, time, temperature,
pressure.
6
Statistics
Example: Voice Lines
A voice communication system for a business contains 48
external lines. At a particular time, the system is observed,
and some of the lines are being used.
Let X denote the number of lines in use.
Then, X can 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, then x = 10.
7
Statistics
Probability Distributions
Recall: A random variable X associates the outcomes of a
random experiment to a number on the number line.
The probability distribution of the random variable X is a
description of the probabilities with the possible numerical
values of X.
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 in
response to an input of the random variables value.
8
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 x
1
x
2
.. . x
n
Probability p(x
1
) p(x
2
) . . p(x
n
)
Statistics
Probability distribution of a discrete
random variable
A Probability Mass Function satisfies
For all values x:
We have:
To give a probability mass function, specify the values
and their corresponding probabilities.
( ) ( ) p x P X x = =
0 ( ) 1 p x s s
( ) 1
x
p x =
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
s
= s =
s s
s s
Statistics
Summary Numbers of a Probability
Distribution
The mean is a measure of the center of a probability
distribution.
The variance is a measure of the dispersion or variability of a
probability distribution.
The standard deviation is another measure of the dispersion. It
is the positive square root of the variance.
12
Statistics
Mean Defined
13
( )
( ) ( )
The or of the discrete random variable X,
denoted as or
mean expected
, is
value
x
E X
E X x p x
= =
=
= +
= +
= +
=
Statistics
Binomial distribution
The probability mass function of X is:
Lets calculate p
k
=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 p
0
p
1
. . p
n
(1 )
k n k
p p
!
!( )!
n
n
k k n k
| |
=
|
\ .
Statistics
Binomial distribution
Lets calculate p
k
=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 k
p p
!
!( )!
n
n
k k n k
| |
=
|
\ .
( ) (1 )
k n k
k
n
p P X k p p
k
| |
= = =
|
\ .
Statistics
Factorials
0!=1
1!=1
2!=1X2=2
3!=1X2X3=6
4!=1X2X3X4=24
5!=1X2X3X4X5=120
General formula :
[this formula is helpful for canceling]
! ( 1)! n n n =
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. Let X = the number of bits in error in the
next 4 bits transmitted. Find P(X=2).
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 where x = 2.
Prob of each is 0.1
2
*0.9
2
= 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 2
4
2 0.1 0.9
2
P X
| |
= =
|
\ .
Statistics
Mean/Variance of the Binomial RV
If X has a Bin(n, p) distribution, the probability mass function
of X is given by
for k = 0,1,2,,n
The Mean and Variance of X are:
X
= np , and
2
X
= np(1-p)
Example: X has Bin(5, 0.6) distribution.
Then the mean is
X
= 5 0.6 = 3 ;
the variance is
2
X
= 5 0.6 0.4 = 1.2
( ) ( )
1
n k
k
n
P X k p p
k
| |
= =
|
\ .