Binomial Distribution

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

STAT 6201 - Mathematical Statistics

Chapter 3 :
Random variables .

5 Event ,
Prc )
.

,
Random variables and distributions
Let S be the sample space associated with a probability experiment.
Assume that we have defined the events of interest and a probability
assignment for each event.

A random variable is a real-valued function that is defined on the


sample space S.
Examples:
I X = number of H in 10 tosses is a random variable;
I Y = 10 X = number of T in 10 tosses is a random variable;
I T = the temperature in this room;
I Z = the price of Apple, Inc. stock tomorrow;
I etc.

The value of a random variable is not known before performing the


probability experiment !
Range of values for a random variable
I While we don’t know the value of a random variable ahead of time
(before performing the experiment), we can (in most cases) list the
possible range of values for a random variable.

Examples :
I X = number of H in 10 tosses is a random variable:
X 2 {0, 1, 2, . . . , 10}
I Y = 10 X = number of T in 10 tosses is a random variable
Y 2 {0, 1, 2, . . . , 10}
I N = number of coin flips until H is observed:
N 2 {1, 2, 3, . . . }
I T = the temperature in this room;
T 2 [20.0, 90.0]
I Z = the price of Apple, Inc. stock tomorrow
Z 2 [0.0, 1)
Discrete vs. conitnuous random variables
I A random variable X is called a discrete if X can take only a finite
or countable set of values

X 2 {x1 , x2 , . . . , xn } or X 2 {x1 , x2 , x3 , . . . }

I A random variable X is called continuous if it takes values in a


subinterval of the real line, or the entire real line.

X 2 [a, b] or X 2 (a, 1) or X 2R

a) too ]
(
a
XE
XE ,
,
Examples
Classify the following variables as discrete or continuous:
I X = number of H in 10 tosses is a random variable:
X 2 {0, 1, 2, . . . , 10} discrete
I Y = 10 X = number of T in 10 tosses is a random variable
Y 2 {0, 1, 2, . . . , 10} discrete
I N = number of coin flips until H is observed:
N 2 {1, 2, 3, . . . } discrete
.

I T = the temperature in this room;

:
T 2 [20.0, 90.0]
I Z = the price of Apple, Inc. stock tomorrow
Z 2 [0.0, 1)
s .
Discrete random variables and their distributions
Recall that a random variable X is called discrete if the range of possible
values is finite or countably infinite. Without loss of generality, we will
assume that
X 2 {x1 , x2 , x3 , . . . }

Since we can’t know the value of X before performing the experiment,


we characterize X by describing how likely each value is. That is, for
each value xi in the range of X , we define

f (xi ) = Pr(X = xi ) it 2,3 .

, ,
.
.

which is the probability that X will take on the value xi .


The collection of probabilities

f (x1 ), f (x2 ), f (x3 ), . . .

define the probability mass function (pmf) of X and they describe the
distribution of X.
Example
Toss a coin three times and let X be the number of H observed.
Find the probability mass function (pmf) of X .
-

XELO 1,2 3 }


, ,
" "
4
K 22 3
,

%
)=Pr(X=o ) f
18
b %
Ho =

f4)=Pr(x=D =
§

fH=Pr(X=y= f
ft
fbtprlx =D
=
Example
Roll two dice and let X be the sum of the two numbers.
Find the pmf of X .

XER , 3,4 ,
,
. .

,l2 }
fH=Pr(X=2)=3t
#
.fB)=Pr(X=D=
436256 . "

}z

fl4I=PrlX=4)= ...
flip a coin until you
observe H

N =
# of coin .

Clips Find the pmf .


of N

Nell , 2,3 ,
. ...
}
f(D=Pr(N=D= E

fH=Pr( Not =L
.

I =
at

%D= Pr(N=2o)=#' 9
.

i w1=Pr(N=w)=#n
Properties of the pmf
Let X be a discrete random variable X 2 {x1 , x2 , x3 , . . . } with probability
mass function
f (x1 ), f (x2 ), f (x3 ), . . .

The numbers f (xi ), i = 1, 2, . . . must satisfy the following properties


I f (xi ) 0;
1
X
I f (x1 ) + f (x2 ) + f (x3 ) + · · · = f (xi ) = 1
i=1

Oefki ) <
1
Major discrete distributions
Bernoulli distribution
A discrete random variable X has a Bernoulli distribution if it can only
take two possible values, sometimes
X 2 {0, 1} "
"
1 = success
"
''

0 = failure
The pmf of a Bernoulli random variable is

f (0) = Pr(X = 0) f (1) = Pr(X = 1)

Convention: f (1) = Pr(X = 1) = p thus f (0) = Pr(X = 0) = 1 p.


Notation X ⇠ Bernoulli(p).
Binomial distribution
Consider an experiment whose outcome can be either success or failure.
Assume that
Pr(success) = p
on each trial. Repeat this experiment n times.
Examples:
I Flip a coin 10 times, think of H as success and T as failure on each
trial;
I Observe 20 items coming out of a production line and record
whether they are defective or not.
I Perform a clinical trial and record whether a patient recovers from
her symptoms or not.

A random variable X has a Binomial distribution if it describes the


total number of successes in n independent and identical trials.

X ⇠ Binomial(n, p)
Binomial distribution
Repeat the same trial n times and let p be the probability of success on
any given trial. Let X denote the total number of successes in n trials.
We say that X ⇠ Binomial(n, p) ( X has a Binomial distribution with
parameters n, p).

Note that
X 2 {0, 1, 2, 3, . . . , n 1, n}
What is the probability mass function (pmf) of X ?

flu --Pr(X=o)=kpT

ftp.prl#D=wp(rpymfH=Pr(Xz2)=(Y)p2ltpT2

"

flk)=Pr(X=k)=( Ye
)p4rA k=o , 1,2 , ...
,w
Binomial distribution
X ⇠ Binomial(n, p) then

X 2 {0, 1, 2, . . . , n}

and X has probability mass function


✓ ◆
n i
f (i) = Pr(X = i) = p (1 p)n i
i = 0, 1, 2, . . . , n
i
Binomial distribution
Connection to the Bernoulli(p) distribution:

Let p 2 (0, 1) and consider n random variables X1 , X2 , . . . , Xn which are


independent and identically distributed (iid) random variables with

Xi ⇠ Bernoulli(p)

Then
Y = X1 + X2 + · · · + Xn
counts the number of “successes” among the n variates X1 , X2 , . . . , Xn .
Thus,
Y ⇠ Binomial(n, p)
Exercise
Suppose that a random variable X has the Binomial distribution with
parameters n = 15 and p = 0.5. Find Pr(X < 6).

XELO ,1 , .
. .

,
15 ) flitprlxai )
.fi?)piCi.pj5iPr(xc6)=Pr(X=o)tMX=Dt...tprlx=5)=lYHsilD'stCi9tHl.H4t..

.
Exercise
Suppose that a random variable X has the Binomial distribution with
parameters n = 8 and p = 0.7. Find Pr(X 5).

exercise

You might also like