ProbabilityDistributions - Data Science
ProbabilityDistributions - Data Science
Probability Distributions
1
Today’s discussion…
Probability vs. Statistics
Binomial distribution
Multinomial distribution
Hypergeometric distribution
Poisson distribution
2
Today’s discussion
• Continuous probability distribution
Continuous uniform probability distribution
Normal distribution
Chi-squared distribution
Gamma distribution
Exponential distribution
Lognormal distribution
Weibull distribution
3
Just a minute to mark your attendance
4
Probability and Statistics
Probability is the chance of an outcome in an experiment (also called event).
Probability deals with predicting the Statistics involves the analysis of the
likelihood of future events. frequency of past events
Example: Consider there is a drawer containing 100 socks: 30 red, 20 blue and
50 black socks.
We can use probability to answer questions about the selection of a
random sample of these socks.
PQ1. What is the probability that we draw two blue socks or two red socks from
the drawer?
PQ2. What is the probability that we pull out three socks or have matching pair?
PQ3. What is the probability that we draw five socks and they are all black?
5
Statistics
Instead, if we have no knowledge about the type of socks in the drawers, then
we enter into the realm of statistics. Statistics helps us to infer properties about
the population on the basis of the random sample.
SQ1: A random sample of 10 socks from the drawer produced one blue, four red, five
black socks. What is the total population of black, blue or red socks in the drawer?
SQ2: We randomly sample 10 socks, and write down the number of black socks and
then return the socks to the drawer. The process is done for five times. The mean
number of socks for each of these trial is 7. What is the true number of black socks in
the drawer?
etc.
6
Probability vs. Statistics
In other words:
In probability, we are given a model and asked what kind of data we are likely to see.
In statistics, we are given data and asked what kind of model is likely to have
generated it.
7
Defining Random Variable
Definition 4.1: Random Variable
A random variable is a rule that assigns a numerical value to an outcome of
interest.
The probability that the random variable takes a given value can be computed
using the rules governing probability.
For example, the probability that means either mother or father but not both has had
measles is . Symbolically, it is denoted as P(X=1) = 0.32
8
Probability Distribution
Definition 4.2: Probability distribution
A probability distribution is a definition of probabilities of the values of
random variable.
Example 4.3: Given that is the probability that a person (in the ages between
17 and 35) has had childhood measles. Then the probability distribution is given
by
X Probability
?
0 0.64
1 0.32
2 0.04
9
Probability Distribution
In data analytics, the probability distribution is important with which
many statistics making inferences about population can be derived .
0.64
Example: Measles Study
0 1 2
0.64 0.32 0.04 0.32
f(x)
0.04
10
Taxonomy of Probability Distributions
Discrete probability distributions
Binomial distribution
Multinomial distribution
Poisson distribution
Hypergeometric distribution
11
Usage of Probability Distribution
Distribution (discrete/continuous) function is widely used in simulation studies.
A simulation study uses a computer to simulate a real phenomenon or process as
closely as possible.
The use of simulation studies can often eliminate the need of costly experiments and
is also often used to study problems where actual experimentation is impossible.
Examples 4.4:
1) A study involving testing the effectiveness of a new drug, the number of cured
patients among all the patients who use such a drug approximately follows a
binomial distribution.
12
Discrete Probability Distributions
13
Binomial Distribution
In many situations, an outcome has only two outcomes: success and failure.
Such outcome is called dichotomous outcome.
An experiment when consists of repeated trials, each with dichotomous outcome is called
Bernoulli process. Each trial in it is called a Bernoulli trial.
14
Defining Binomial Distribution
Definition 4.3: Binomial distribution
The function for computing the probability for the binomial probability
distribution is given by
for x = 0, 1, 2, …., n
Here, where denotes “the number of success” and denotes the number of
success in trials.
15
Binomial Distribution
Example 4.6: Measles study
X = having had childhood measles a success
p = 0.2, the probability that a parent had childhood measles
n = 2, here a couple is an experiment and an individual a trial, and the
number of trials is two.
Thus,
16
Binomial Distribution
Example 4.7: Verify with real-life experiment
Suppose, 10 pairs of random numbers are generated by a computer (Monte-Carlo method)
15 38 68 39 49 54 19 79 38 14
If the value of the digit is 0 or 1, the outcome is “had childhood measles”, otherwise,
(digits 2 to 9), the outcome is “did not”.
For example, in the first pair (i.e., 15), representing a couple and for this couple, x = 1. The
frequency distribution, for this sample is
x 0 1 2
f(x)=P(X=x) 0.7 0.3 0.0
17
The Multinomial Distribution
The binomial experiment becomes a multinomial experiment, if we let each trial has
more than two possible outcome.
If a given trial can result in the k outcomes with probabilities then the
probability distribution of the random variables representing the number of
occurrences for in n independent trials is
where =
and
18
The Hypergeometric Distribution
• Collection of samples with two strategies
• With replacement
• Without replacement
• A necessary condition of the binomial distribution is that all trials are
independent to each other.
• When sample is collected “with replacement”, then each trial in sample collection is
independent.
Example 4.8:
Probability of observing three red cards in 5 draws from an ordinary deck of 52
playing cards.
You draw one card, note the result and then returned to the deck of cards
Reshuffled the deck well before the next drawing is made
• The hypergeometric distribution does not require independence and is based on the
sampling done without replacement.
19
The Hypergeometric Distribution
In general, the hypergeometric probability distribution enables us to find the
probability of selecting successes in trials from items.
20
Multivariate Hypergeometric Distribution
The hypergeometric distribution can be extended to treat the case where the N
items can be divided into classes with elements in the first class , … and
elements in the class. We are now interested in the probability that a random
sample of size yields elements from elements from elements from
with
21
The Poisson Distribution
There are some experiments, which involve the occurring of the number of
outcomes during a given time interval (or in a region of space).
Such a process is called Poisson process.
Example 4.9:
Number of clients visiting a ticket selling counter in a metro station.
22
The Poisson Distribution
Properties of Poisson process
The number of outcomes in one time interval is independent of the number that occurs
in any other disjoint interval [Poisson process has no memory]
The probability that a single outcome will occur during a very short interval is
proportional to the length of the time interval and does not depend on the number of
outcomes occurring outside this time interval.
The probability that more than one outcome will occur in such a short time interval is
negligible.
23
Descriptive measures
Given a random variable X in an experiment, we have denoted the probability that .
For discrete events for all values of except
1. [ is the mean ]
2. [ is the variance ]
and
24
Descriptive measures
1. Binomial distribution
The binomial probability distribution is characterized with (the probability of
success) and (is the number of trials). Then
2. Hypergeometric distribution
The hypergeometric distribution function is characterized with the size of a sample ,
the number of items and labelled success. Then
25
Descriptive measures
3. Poisson Distribution
The Poisson distribution is characterized with where and .
26
Continuous Probability
Distributions
27
Continuous Probability Distributions
f(x)
x1 x2 x3 x4
X=x
Discrete Probability distribution
f(x)
X=x
Continuous Probability Distribution
28
Continuous Probability Distributions
When the random variable of interest can take any value in an interval, it is
called continuous random variable.
Every continuous random variable has an infinite, uncountable number of possible
values (i.e., any value in an interval)
29
Properties of Probability Density Function
The function is a probability density function for the continuous random
variable , defined over the set of real numbers , if
1.
f(x)
a b
X=x
30
Continuous Uniform Distribution
One of the simplest continuous distribution in all of statistics is the
continuous uniform distribution.
31
Continuous Uniform Distribution
f(x)
c
A B
X=x
Note:
a)
b) )= where both and are in the interval (A,B)
32
Normal Distribution
The most often used continuous probability distribution is the normal
distribution; it is also known as Gaussian distribution.
Its graph called the normal curve is the bell-shaped curve.
33
Normal Distribution
• The mathematical equation for the probability distribution of the normal variable
depends upon the two parameters and , its mean and standard deviation.
f(x)
σ2
µ1
µ1 µ2
µ2 µ1 = µ2
Normal curves with µ1< µ2 and σ1 = σ2 Normal curves with µ1 = µ2 and σ1< σ2
σ1
σ2
µ1 µ2
Normal curves with µ1<µ2 and σ1<σ2 35
Properties of Normal Distribution
The curve is symmetric about a vertical axis through the mean
The random variable can take any value from
The most frequently used descriptive parameter s define the curve itself.
The mode, which is the point on the horizontal axis where the curve is a
maximum occurs at .
The total area under the curve and above the horizontal axis is equal to .
36
Standard Normal Distribution
The normal distribution has computational complexity to calculate for any two , and
given and
To avoid this difficulty, the concept of -transformation is followed.
[Z-transformation]
37
Standard Normal Distribution
Definition 4.10: Standard normal distribution
The distribution of a normal random variable with mean and variance is called a
standard normal distribution.
0.09
0.4
0.08 σ σ=1
0.07
0.3
0.06
0.05
0.2
0.04
0.03
0.02 0.1
0.01
0.00 0.0
-5 0 5 10 15 20 25 -3 -2 -1 0 1 2 3
x=µ µ=0
f(x: µ, σ) f(z: 0, 1)
38
Gamma Distribution
The gamma distribution derives its name from the well known gamma function in
mathematics.
for
39
Gamma Distribution
When , we can write,
Further,
Note:
[An important property]
40
Gamma Distribution
Definition 4.12: Gamma Distribution
The continuous random variable has a gamma distribution with parameters and
such that:
1.0
σ=1, β=1
0.8
0.6
f(x)
0.4
σ=2, β=1
0.2
σ=4, β=1
0.0
0 2 4 6 8 10 12
x
41
Exponential Distribution
Definition 4.13: Exponential Distribution
Note:
1) The mean and variance of gamma distribution are
42
Chi-Squared Distribution
Definition 4.14: Chi-squared distribution
and
43
Lognormal Distribution
The lognormal distribution applies in cases where a natural log transformation
results in a normal distribution.
44
Lognormal Distribution
0.7
µ=0, σ=1
0.6
0.5
0.4
f(x)
0.3
0.2
µ=1, σ=1
0.1
0.0
0 5 10 15 20
x
45
Weibull Distribution
Definition 4.16: Weibull Distribution
The continuous random variable has a Weibull distribution with parameter and
such that.
where and
1.0
ß=1
The mean and variance of Weibull
0.8
distribution are:
0.6
f(x)
0.4
ß=2
0.2
ß=3.5
0.0
0 2 4 6 8 10 12
x
46
Reference
47
Any question?
You may Prepare & post your question(s) at the “Team” maintained
for the course!
48
Questions of the day…
1. Give some examples of random variables? Also, tell the
range of values and whether they are with continuous or
discrete values.
49
Questions of the day…
2. In the following cases, what are the probability
distributions are likely to be followed. In each case, you
should mention the random variable and the parameter(s)
influencing the probability distribution function.
c) A missile will hit the enemy’s aircraft.
d) A student in the class will secure EX grade.
e) Salary of a person in an enterprise.
f) Accident made by cars in a city.
g) People quit education after i) primary ii) secondary and iii) higher
secondary educations.
50
Questions of the day…
3. How you can calculate the mean and standard deviation of
a population if the population follows the following
probability distribution functions with respect to an event.
a) Binomial distribution function.
b) Poisson’s distribution function.
c) Hypergeometric distribution function.
d) Normal distribution function.
e) Standard normal distribution function.
51