0% found this document useful (0 votes)
11 views

Probability

The document discusses the concept of probability, including its definition, properties, and methods for calculating probabilities through examples. It covers various probability distributions such as binomial, Poisson, uniform, and normal distributions, detailing their applications and mathematical formulations. Additionally, it provides examples to illustrate how to compute probabilities using these distributions.

Uploaded by

saidmostafaraad
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Probability

The document discusses the concept of probability, including its definition, properties, and methods for calculating probabilities through examples. It covers various probability distributions such as binomial, Poisson, uniform, and normal distributions, detailing their applications and mathematical formulations. Additionally, it provides examples to illustrate how to compute probabilities using these distributions.

Uploaded by

saidmostafaraad
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 37

Advance medical communication

By

Prof. Dr. Sadik Kamel Gharghan


Department of Medical Instrumentation Engineering Techniques, Electrical Engineering
Technical College, Middle Technical University, Baghdad-Iraq
Postgraduate (M. Tech.)
Second Semester (2020-2021)

20 April 2021
Probability
Probability
Probability: is a measure of the likelihood of a
random phenomenon or chance behavior.
Probability describes the long-term proportion
with which a certain outcome will occur in
situations with short-term uncertainty.

EXAMPLE
Simulate flipping a coin 100 times. Plot the
proportion of heads against the number of flips.
Repeat the simulation.

3
Probability
• Life is uncertain and full of surprise. Do you know what happen
tomorrow
• Make decision and live with the consequence
• The probability of an event is a numerical value that measures the
likelihood that the event can occur
Probability as a Numerical Measure
of the Likelihood of Occurrence

Increasing Likelihood of Occurrence

0 .5 1
Probability:

The event The occurrence The event


is very of the event is is almost
unlikely just as likely as certain
to occur. it is unlikely. to occur.
Basic Probability Properties
Let P(E) be the probability of the event E, then

0 ≤P(E)≤ 1
The sum of the probability of all possible outcomes should be 1.

Probability of an event E (where n is number of trials) :

Number of times E occurs (N)


P ( E )  lim
n  n
Finding Probabilities
• Probabilities can be found using
• Estimates from empirical studies
• Common sense estimates based on equally likely
events.

•Examples:
–Toss a fair coin. P(Head) = 1/2
–Rolling a two pair of fair dice
P(4) = 2/12=1/6
Example: Suppose that a pair of fair dice are thrown.

suppose a pair of fair 6-sided dice are thrown. what is the probability that the
sum of the rolls is 6?

Solution

P(E) = N/n = 5/36 = 0.1388

8
Example

• Toss a fair coin twice. What is the probability of


observing at least one head?

1st Coin 2nd Coin Ei P(Ei)


H HH 1/4 P(at least 1 head)
H
T HT 1/4 = P(E1) + P(E2) + P(E3)
H TH 1/4 = 1/4 + 1/4 + 1/4 = 3/4
T 1/4
T TT
Example
• A bowl contains three small balls , one red, one
blue and one green. A child selects two balls at
random. What is the probability that at least one
is red?

1st ball 2nd ball Ei P(Ei)


b RB 1/6
b
b RG 1/6 P(at least 1 red)
b
b
BR 1/6 = P(RB) + P(BR)+ P(RG)
b + P(GR)
BG 1/6
b = 4/6 = 2/3
b GB 1/6
b GR
1/6
Important Probability Distributions
Certain probability distributions occur with such regularity in real-life
applications that they have been given their own names. Here, we survey and
study basic properties of some of them. We will discuss the following
distributions:
Binomial
Poisson
Uniform
Normal
CDF
Exponential

The first two are discrete and the last four are continuous.
Binomial Distributions
Consider the following scenarios:
• The number of heads/tails in a sequence of coin flips.
• Vote counts for two different candidates in an election.
• The number of male/female employees in a company.
• The number of defective products in a production run
• The number of days in a month your company’s computer network
experiences a problem
All of these are situations where the binomial distribution may be
applicable.
Binomial Distributions
There is a set of assumptions which, if valid, would lead to a binomial
distribution. These are:
• A set of n experiments or trials are conducted.
• Each trial could result in either a success or a failure.
• The probability P of success is the same for all trials.
• The outcomes of different trials are independent.
• We are interested in the total number of successes in these n trials.
Binomial Distributions
Consider an experiment having only two possible outcomes. A and B, which are
mutually exclusive. Let the Probability be P(A)=p and P(B)= 1-p = q.
The experiment is repeated n times and the probability of A occurring i times is:
𝑛
𝑃𝑖 = 𝑖
𝑝𝑖 (1 − 𝑝)𝑛−𝑖 (1)
𝑛
where 𝑖
is the binomial coefficient,
𝑛 𝑛!
𝑖
= (2)
𝑖! 𝑛−𝑖 !
Binomial Mean and Variance

𝑚𝑒𝑎𝑛 𝜇 = 𝑛𝑝 (3)

𝑉𝑎𝑟𝑖𝑎𝑛𝑐𝑒 𝜎 2 = 𝑛𝑝(1 − 𝑝) (4)


Binomial Distributions
Example: Consider an exam that contains 10 multiple-choice questions with 4 possible choices for each question, only one of
which is correct.
1- What is the probability for the student to get no answer correct?
2- What is the probability for the student to get two answers correct?
3- What is the probability for the student to fail the test (i.e., to have less than 6 correct answers)?
4- What is the mean and variance?

Answers

Suppose a student is to select the answer for every question randomly. Let i be the number of questions the student answers

correctly. Then, i has a binomial distribution with parameters n = 10 and p = 0.25.

𝑛 𝑖 𝑛 𝑛! 𝑛!
𝑃𝑖 = 𝑝 (1 − 𝑝)𝑛−𝑖 , = 𝑃𝑖 = 𝑝𝑖 (1 − 𝑝)𝑛−𝑖
𝑖 𝑖 𝑖! 𝑛 − 𝑖 ! 𝑖! 𝑛 − 𝑖 !

10!
𝑃𝑖=0 = 0! (0.25)0 (1 − 0.25)10−0 = (0.75)10 = 0.0563
10−0 !
2-

𝑛 𝑖 𝑛 𝑛!
𝑃𝑖 = 𝑝 (1 − 𝑝)𝑛−𝑖 , =
𝑖 𝑖 𝑖! 𝑛 − 𝑖 !

𝑛!
𝑃𝑖 = 𝑝𝑖 (1 − 𝑝)𝑛−𝑖
𝑖! 𝑛 − 𝑖 !

10!
𝑃𝑖=2 = (0.25)2 (1 − 0.25)10−2
2! 10 − 2 !

= 45. (0.25)2 . (0.75)8 = 0.2816


3-
5
10!
𝑃 𝑖≤5 = 𝑃 𝑖=𝑗 = (0.25)0 1 − 0.25 10−0
0! 10 − 0 !
𝑗=0
10! 10!
+ (0.25)1 1 − 0.25 10−1 + (0.25)2 1 − 0.25 10−2
1! 10−1 ! 2! 10−2 !
10! 10!
+ (0.25)3 1 − 0.25 10−3 + (0.25)4 1 − 0.25 10−4
3! 10−3 ! 4! 10−4 !
10!
+ (0.25)5 1 − 0.25 10−5
5! 10−5 !

= 0.0563+0.1877+0.2816+0.2503+0.1460+0.0584 =0.9803
4- 𝜇 = 𝑛𝑝 , 𝜇 = 10 × 0.25 = 2.5

𝜎 2 = 𝑛𝑝 1 − 𝑝 , 𝜎 2 = 10 × 0.25 1 − 0.25 = 1.875


Binomial probability density function
The binomial probability density function can be expressed as follows:
𝑛
𝑛 𝑖
𝑝 𝑥 = 𝑝 (1 − 𝑝)𝑛−𝑖 𝛿(𝑥 − 𝑖) 5
𝑖
𝑖=0
Where i is the integer number of times that event A occurs.

Example: Three honest dice are rolled. Write the BPDF for the number of ones showing up.
Solution: Let X be the number of ones ; then p= 1/6 , (1-p) =5/6 , n =3, and
3
3 1 𝑖 5 3−𝑖
𝑝 𝑥 = ( )( ) 𝛿 𝑥−𝑖 ,
𝑖 6 6
𝑖=0

125 75 15 1
𝑝 𝑥 = 𝛿 𝑥 + 𝛿 𝑥−1 + 𝛿 𝑥−2 + 𝛿(𝑥 − 3)
216 216 216 216
Poisson distributions
When the number of trails n gets very large and p is very small, the binomial distribution becomes awkward to
handle. However, if the mean value remains finite we can approximate the binomial distribution by the Poisson
distribution,

𝜇𝑖
𝑃𝑖 = 𝑒 −𝜇 6
𝑖!
where µ is the average value of the occurrence of the desired event.
The Poison distribution is pertinent to the transmission of many data digits when the error rates are low. It also
arises in some physical problems.
0.30

0.25

0.20

0.15

0.10

0.05

0.00
1 2 3 4 5 6 7 8 9
Poisson distributions
Example: Typos
The number of typographical errors in a “big” textbook is Poisson distributed with a mean of 1.5 per 100 pages.
1-Suppose 100 pages of the book are randomly selected. What is the probability that there are no typos?
2-Suppose 400 pages of the book are randomly selected. What are the probabilities for having no typos and the probabilities for
having five or fewer typos?
Solution 𝜇𝑖
𝑃𝑖 = 𝑒 −𝜇
1.5
1- 𝜇 = 𝑛𝑝 = 100 × 100 = 1.5 𝑖!

(1.5)0
𝑃𝑖=0 = 𝑒 −1.5 = 0.2231
0!
1.5
2- 𝜇 = 𝑛𝑝 = 400 × 100 = 4 × 1.5 = 6

−6
(6)0
𝑃𝑖=0 = 𝑒 = 0.002479
0!
5 −𝜇 𝜇𝑖
3-𝑃 i ≤ 5 = 𝑖=0 𝑒 = 0.0025+0.0149+0.0446+0.0892+0.1339+0.1606=0.4457
𝑖!
Hw1:
Two honest dice are rolled and the desired outcome is the appearance of all ones. (a) Calculate the probability that this will
occur twice in forty rolls, first using the binomial distribution and then approximating with the Poisson distribution. (b) Repeat
Uniform distributions
The uniform distribution is the simplest example of a continuous probability
distribution. A random variable X is said to be uniformly distributed if its density
function is given by:
Normal distributions
A known probability density function (pdf) is the Gaussian or “normal” density function. It
arises when a large number of independent factors (within some fairly broad restrictions)
contribute additively to an end result. The normal distribution is the most important distribution
in statistics, since it arises naturally in numerous applications. The key reason is that large sums
of (small) random variables often turn out to be normally distributed.
A random variable X is said to have the normal distribution with parameters μ and σ if its
density function is given by:

1 1 𝑥−𝜇
− 2 ( 𝜎 )2
𝑓 𝑥 = 𝑒 7
𝜎 2𝜋

for −∞ ≤ 𝑥 ≤ ∞
(𝑥−𝜇)2 𝑥
where σ standard deviation 𝜎 = , µ is the mean 𝜇= , x each value in the
𝑁 𝑁
population, and N the number of values (population).
Normal distributions
A typical normal density curve looks like this:

Thus, the curve is bell shaped and is symmetric around the mean μ. The standard
deviation σ controls the “flatness” of the curve.
Example: Calculate the probability density function of normal distribution using the following data. x = 3, μ = 2
and σ = 2.
Solution: Given, variable, x = 3
Mean = 2 and
Standard deviation = 2
By the formula of the probability density of normal distribution, we can write;

Hence, f(3,2,2) = 1.106.

Example: If the value of random variable is 2, mean is 2 and the standard deviation is 4, then find the
probability density function of the Gaussian distribution.
Solution: Given, Variable, x = 2
Mean = 2 and
Standard deviation = 4
By the formula of the probability density of normal distribution, we can write;

f(2,2,4) = 1/(4√2π) e0
f(2,2,4) = 0.0997
• Increasing the mean shifts the density curve to the right.
Same standard deviations, different means.
• Increasing the standard deviation flattens the density curve
Same mean, different standard deviations.
A normal distribution whose mean is 0 and standard deviation is 1 is called a normalized
Gaussian pdf. In this case, the density function assumes the simpler form:
1 −𝑧 2 2
𝑝 𝑧 = 𝑒 (8)
2𝜋
where a standardized normal random variable Z with parameters 0 and 1 via the transformation:
𝑥−𝜇
𝑍=
𝜎

• The curve never actually reaches the horizontal axis


buts gets close to it beyond about 3 standard deviations
each side of the mean.
• For any Normally distributed variable:
68.26% of all values will lie between μ −σ and μ +σ
(i.e. μ ±σ )
95.44% of all values will lie within μ ± 2σ
99.74% of all values will lie within μ ± 3σ
Three Common Areas Under the Curve
𝑥−𝜇
𝑍=
𝜎
How to Interpret z-Score
• Here is how to interpret z-scores-
• A z-score less than 0 represents an element less than the mean.
• A z-score greater than 0 represents an element greater than the mean.
• A z-score equal to 0 represents an element equal to the mean.
• A z-score equal to 1 represents an element that is 1 standard deviation greater than
the mean; a z-score equal to 2, 2 standard deviations greater than the mean; etc.
• A z-score equal to -1 represents an element that is 1 standard deviation less than the
mean; a z-score equal to -2, 2 standard deviations less than the mean; etc.
• If the number of elements in the set is large, about 68% of the elements have a z-
score between -1 and 1; about 95% have a z-score between -2 and 2; and about 99%
have a z-score between -3 and 3.
Z-score table
Example: For some computers, the time period between charges of the battery is normally
distributed with a mean of 50 hours and a standard deviation of 15 hours. Ali have one of these
computers and needs to know the probability that the time period will be between 50 and 70
hours.
Solution: Let x be the random variable that represents the time period.
Given Mean, μ= 50
and standard deviation, σ = 15
To find: Probability that x is between 50 and 70 or P( 50< x < 70)
By using the transformation equation, we know;
z = (X – μ) / σ
For x = 50 , z = (50 – 50) / 15 = 0
For x = 70 , z = (70 – 50) / 15 = 1.33
P( 50< x < 70) = P( 0 < z < 1.33) = [area to the left of z = 1.33] – [area to the left of z = 0]
From the table we get the value, such as;
P( 0< z < 1.33) = 0.9082 – 0.5 = 0.4082
Example: The speeds of cars is measure using a radar unit, on a motorway. The speeds
are normally distributed with a mean of 90 km/hr and a standard deviation of 10 km/hr.
What is the probability that a car selected at chance is moving at more than 100 km/hr?
Solution: Let the speed of cars is represented by a random variable ‘x’.
Now, given mean, μ = 90 and standard deviation, σ = 10.
To find: Probability that x is higher than 100 or P(x > 100)
By using the transformation equation, we know;
z = (X – μ) / σ
Hence,
For x = 100 , z = (100 – 90) / 10 = 1
P(x > 90) = P(z > 1) = [total area] – [area to the left of z = 1]
P(z > 1) = 1 – 0.8413 = 0.1587
Cumulative Distribution Function (CDF)


 The cumulative distribution function (CDF) calculates
the cumulative probability for a given x-value.
 In case of a continuous distribution, it gives the area
under the probability density function from minus
infinity (-∞) to x.
 You can also use this information to determine the
probability that an observation will be greater than a
certain value, or between two values.
Cumulative Distribution Function (CDF)
The exact value is the one given by the cumulative function.

dx
1

0.9
Benchmark
Measured
0.8

0.7

0.6

CDF
0.5

0.4

0.3

0.2

0.1

0
8 13 18 23 28 33 38
Speed (km/h)
Negative Exponential Distribution
Another useful continuous distribution is the exponential distribution, which has the following
probability density function:

𝑓 𝑥 = 𝜆𝑒 −𝜆𝑥 (9)
for x ≥ 0.
• This family of distributions is characterized by a single
parameter λ, which is called the rate.
• The exponential distribution is typically used to model time
intervals between “random events”.
Example: For = 0.5, 1, and 2, the shapes of the exponential
density curve are:
Observe that the greater the rate, the faster
the curve drops. Or, the lower the rate, the flatter the curve.

 Standard deviation (σ) =1/λ and variance = (𝟏 𝝀)𝟐


• Example 1: Lifetime of a Battery
The lifetime X of an alkaline battery is exponentially distributed with = 0.05 per
hour. What are the mean and standard deviation of the battery’s lifetime?
Answer:
1 1
𝜎= = = 20 ℎ𝑜𝑢𝑟𝑠
𝜆 0.05
• What are the probabilities for the battery to last between10 and 15 hours and to
last more than 20 hours?
Answer:
THANKS

You might also like