You are on page 1of 57

Dr.

Abdur Rasheed
Visiting Faculty IoBM

Discrete
distributions
Random Variable

A random variable is a function or rule that assigns a number


to each outcome (single result) of an experiment. Basically it is
just a symbol that represents the outcome of an experiment.
Example
X = Number of patients come to a certain clinic daily
Y= Number of accidents on a road in specific time

Continuous random variable Discrete random variable


Discrete random variable
Usually count data [Number of]
One that takes on a countable number of values
This means you can list down and list all possible outcomes without
missing any value
Example
Y = number of accidents on the UTA campus during a week: Y has to
be 0, 1, 2, 3, 4, 5, 6, 7, 8, ……………”real big number”

Continuous random variable


Usually measurement data [time, weight, distance, etc]
One that takes on an uncountable number of values
This means you can never list all possible outcomes even if you had an
infinite amount of time.
X = time it takes you to drive home from class: X > 0, might be 30.1 minutes
measured to the nearest tenth but in reality the actual time is
30.10000001…………………. minutes?)
Probability distribution of discrete
random variable
The following table shows the frequency
distribution with probabilities for 1341 subjects
screened for flourosis from Riyadh city in 1986.
Flourosis status (x) Number of subjects Probability P(x)
None 772 0.5757
Questionable 150 0.1119
Very mild 181 0.1350
Moderate 150 0.1119
Severs 88 0.0655
Total 1341 1.0000
Properties of discrete probability
distribution

If ‘X’ is a discrete random variable then

I) 0  P(X)  1
ii)  P(X) = 1
Mean, Variance and Standard Deviation of Discrete
Distribution

Mean or Expected Value


Mean, Variance and Standard Deviation of Discrete
Distribution
Variance

Standard Deviation
During one holiday season, the Texas lottery played a game called the stocking
stuffer. With this game, total instant winnings of $34.8 million were available in
70 million $1 tickets, with ticket prizes ranging from $1 to $1,000. Shown here
are the various prizes and the probability of winning each prize. Use these data
to compute the expected value, variance and standard deviation of the game.

Prize (x) Probability P(x)


$1,000 0.00002
100 0.00063
20 0.00400
10 0.00601
4 0.02403
2 0.08877
1 0.10479
0 0.77175
Prize (x) Probability P(x) X . P(x)

$1,000 0.00002 0.02000 998797.2619 19.97595


0
100 0.00063 0.06300 9880.05186 6.22443

20 0.00400 0.08000 376.29986 1.50520

10 0.00601 0.06010 88.33086 0.53087

4 0.02403 0.09612 11.54946 0.27753

2 0.08877 0.17754 1.95566 0.17360

1 0.10479 0.10479 0.15876 0.01664

0 0.77175 0.00000 0.36186 0.27927

Total 0.60155 28.98349


Determine the mean, variance and standard deviation of
the following discrete distribution
x Probability P(x)
0 0.103
1 0.118
2 0.246
3 0.229
4 0.138
5 0.094
6 0.071
7 0.001
Probability Density Functions

A probability density function (PDF) tells us the probability that a random


variable takes on a certain value.

For example, suppose we roll a dice one time. If we let x denote the
number that the dice lands on, then the probability density function for
the outcome can be described as follows:

P(x = 1) : 1/6

P(x = 2) : 1/6

P(x = 3) : 1/6
Cumulative Density Functions

A cumulative distribution function (CDF) tells us the probability that


a random variable takes on a value less than or equal to x.

P(x ≤ 1) : 1/6 P(x ≤ 2) : 2/6

P(x ≤ 3) : 3/6 P(x ≤ 4) : 4/6

P(x ≤ 5) : 5/6 P(x ≤ 6) : 6/6


Discrete probability distribution

There are several discrete probability distributions.


Two of them are

Binomial
distribution
Bernoulli trials

In experiments where a certain process is carried out


repeatedly, with each process independent of the
others, it is possible to deduce the result of an event.

In particular, if we can separate the outcomes of an


experiment into two groups, one which is desirable, and
we call it success, while the other a failure, then we
have the case of a Bernoulli trial.
Success and failure

A cancer patient may die or may not , our interest is death of


patient , Success = death and failure = life

If you are expected to reach an office before 10.00 a.m. then


arriving before then is a success and being late will be a failure.
Binomial distribution
If we repeat a Bernoulli trial many times, and count the
number of successes using X, then we shall have a
binomial distribution if
▪ Each trial is independent of the other;
▪ The probability of each success remains the same for
each trial.
If the probability of each success is p, (probability of
failure on each trial equals 1-p) and we run the
experiment n times, then suppose we use X to represent
the number of successes, we shall write X ~ Bin(n, p).
When a trail is done n times, the number of success
must be one of 0, 1, 2, … n.
Hence,
a binomial distribution X~Bin(n, p) must have all values
from 0 to n only. In short:
X = {0, 1, …, n}
P(X=x) > 0 for all x X.
Of course, it is possible that P(X=x) is so small that in
practice, we will just put it as 0. But technically, the is
no zero probability for each of the X.
The probability of the random variable 'X' is given by:
n x n− x
P( X = x) = P( X ) =   p (1 − p)
 x x = 0,1,2, ...., n
n n
  = C x = n!/(n-x)! x!
 x
n! = n.(n-1).(n-2)…..1
0! = 1
The Parameters of the binomial
distribution are n and p.
Mean and Standard Deviation of Binomial
Distribution
Some important concepts
We know that  P(X) = 1

Probability density function P.d.f → P(X= x)

Cumulative density function C.d.f →P(X ≤ x)

P(X ≥ x) = 1-P(X < x)

P(X ≥ 5) = 1-P(X < 5) = 1-P(X ≤ 4)


A coin is tossed 10 times. What is the probability of
getting exactly 6 heads?

𝑛 𝑥
𝑃 𝑋=𝑥 =𝑃 𝑋 = 𝑃 (1 − 𝑃)𝑛−𝑥
𝑥
The number of trials (n) is 10
The chances of success (“tossing a heads”) is 0.5
(1-p = 0.5)
No of success x = 6
10
𝑃 𝑋=6 =𝑃 𝑋 = 0.56 (1 − 0.5)10−6
6

𝑃 𝑋 = 6 = 0.205078
80% of people who purchase pet insurance are women. If
9 pet insurance owners are randomly selected, find the
probability that exactly 6 are women.

𝑃 𝑋 = 6 = 0.176
Example

Suppose it is known that 60% of the Riyadh


population has fluorosis free teeth. If a random
sample of 10 persons is selected from Riyadh,
what is the probability that exactly four persons
have fluorosis free teeth?
n = 10 p = 0.6 x=4
SPSS commands for P(X= 4) PDF will be used
The probability that exactly four persons
have fluorosis free teeth is

P(X=4) = 0.11
Example
It is known that in 35% of accidents involving motorcycles,
the rider dies. On a day when 10 such accidents are reported,
what is the probability
(i) 2 riders die?
(ii) At least 3 riders die?
At least 3 riders die = P(D3) = ?

P(D3) = 1 – P(D<3) = 1- P(D≤2)

First we will find P(D≤2)


SPSS commands for P(D≤2) CDF will be used
P(D3) = 1 – P(D<3) = 1-P(D≤2)

P(D≤2)= 0.26
P(D3) = 1- P(D ≤ 2)
P(D3) = 1- 0.26
P(D3) = 0.74

The probability of at least 3 riders die is 0.74


The probability that a patient recovers from a rare blood disease is 0.4. if 15
people are known to have contracted this disease, what is the probability that

a) At least 10 survive

b) From 3 to 8 survive

c) Exactly 5 survive
An increasing number of consumers believe they have to look out for
themselves in the marketplace. According to a survey conducted by
Yankelovich Partners for USA WEEKEND magazine, 60% of all consumers have
called an 800 or 900 telephone number for information about some product.
Suppose a random sample of 20 consumers is contacted an interviewed about
their buying habits.

What is the probability that 13 or more of these consumers have called on


800 or 900 telephone number for information about some product?

What is the probability that fever than 5 of these consumers have called on
800 or 900 telephone number for information about some product?

What is the probability that more than 17 of these consumers have called on
800 or 900 telephone number for information about some product?

What is mean and standard deviation of consumers have called on 800 or


900 telephone number for information about some product?
Working examples
Q1: Solve the following problems using Binomial Distribution

Q2: Solve for the mean and standard deviation of the


following Binomial Distribution
If n= 25 and p= 0.75
If n= 60 and p= 0.45
If n= 100 and q= 0.60
Poisson distribution
The Poisson distribution is used to model the
number of events occurring within a given time
interval. The formula for the Poisson
probability density (mass) function is

e 
− x
p ( x) = x = 0,1, 2,3,.. ..
x!
 is the shape parameter which indicates the
average number of events in the given time
interval.
Some events are rather rare - they don't
happen that often. For instance, car
accidents are the exception rather than the
rule. Still, over a period of time, we can say
something about the nature of rare events.

An example is the improvement of traffic


safety, where the government wants to know
whether seat belts reduce the number of
death in car accidents. Here, the Poisson
distribution can be a useful tool to answer
questions about benefits of seat belt use.
Other phenomena that often follow a Poisson
distribution are

Death of infants
The number of misprints in a book
The number of customers arriving
Example
Arrivals at hospital follow a Poisson
distribution with an average of 4.5
every quarter of an hour.
Calculate the probability of less than
3 arrivals in a quarter of an hour.
P( X < 3 ) = P( X ≤ 2)
Calculation of probability of less than 3 arrivals in a quarter of an hour.
P( X < 3 ) = P( X ≤ 2) CDF will be used
The probability of less than 3 arrivals in a quarter
of an hour is

P( X < 3 ) = P( X ≤ 2)= 0.17


Bank customer arrive randomly on weekday afternoons at an
average of 3.2 customers every 4 minutes. What is probability of
having more than 7 customers in a 4 minute interval on a weekday
afternoon ?
Examples
Q1: A pen company averages 1.1 defectives pens per carton produced
(200 pens).

What is the probability of selecting a carton and finding no defective


pen?

What is the probability of finding seven or more defective pens in a


carton?

Suppose a purchaser of these pens will quit buying from the company
if a carton contains more than three defective pens. What is the
probability that a carton contains more then three defective pens?
Thank you

You might also like