0% found this document useful (0 votes)
9 views18 pages

Week 4 Slides

Uploaded by

berkeunver2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views18 pages

Week 4 Slides

Uploaded by

berkeunver2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Binomial Distribution w-4

Binomial Distribution
- You are taking a 20 question multiple choice (5 choices) test where you
randomly guess the answer in each question. What is the probability that you
correctly guessed exactly 8 questions?

- This is a typical Binomial distribution where our RV x is the number of success


in 20 Bernoulli trials
- So n=20, p=1/5, (1-p)=4/5 and we are interested with the probability P(x=8)=?
- Lets calculate P(x>5)=? P(4≤x≤12)=? 10 mins class excercise…
Binomial Distribution
Example:
The random variable X has a binomial distribution with n=10 and p=0.01.
Determine P(X=5), P(X≥9), P(X≤2), P(3≤X<5) and µ and σ2

We have n=10 and p=0.01. Then


10 10!
P(X=5)= p5 (1-p)10-5 = 0.01 5 0.99 5
5 5! 10−5 !
P(X≥9) = P(X=9)+P(X=10)
P(X≤2) = P(X=0)+ P(X=1)+ P(X=2)
P(3≤X<5) = P(X=3)+ P(X=4)

Recall that for binomial distribution µ=E(X)=np and σ2 =np(1-p) from these we find
µ=10(0.01)=0.1 and σ2=10(0.01)(0.99)=0.099 and standart deviation= σ = √σ2 = 0.3146
Geometric Distribution
Consider a random experiment that is closely related to the one used
in the definition of a binomial distribution. Again, assume a series of
Bernoulli trials (independent trials with constant probability p of a
success on each trial). However, instead of a fixed number of trials,
trials are conducted until a success is obtained. Let the random
variable X denote the number of trials until the first success. Then
X is said to have Geometric Distribution. Formally;
Geometric Distribution
- You are taking a series of multiple choice questions (5 choices) test where you
randomly guess the answer in each question. Then the number of questions (X)
you should solve to get first correct answer has Geometric Distribution with p.

- We are seeking the minimum of n (number of trials) to get our first success.
- So p=1/5, (1-p)=4/5 and find the probability P(x=12)=? Or more formally what is
the probability that you should solve 12 questions until your first success?
Geometric Distribution
Example:
Suppose the random variable X has a geometric distribution with
p=0.5. Determine P(X=4), P(X>2), P(X≤2) and µ and σ2

We have p=0.5, Then


P(X=4)= (1-p)4-1 p = 0.5 3 0.5 = 0.0625
P(X>2) = P(X=3)+P(X=4) +P(X=5) +P(X=6)….. = 1- P(X≤2) = 1 – [P(X=1)+P(X=2)]
P(X≤2) = P(X=1)+ P(X=2)

Recall that for geometric distribution µ=E(X)=1/p and σ2 =(1-p)/p2 from these we find
µ=1/0.5=2 and σ2=0.5/0.25=2 and standart deviation= σ = √σ2 = 1.4142
Geometric Distribution
Example:
Suppose the random variable X has a geometric distribution with a
mean of 2.5. Determine P(X=4), P(X>3)

We don’t have p to calculate the probabilities but we have µ=E(X)=2.5,


We know that for geometric distribution µ=E(X)=1/p, then 2.5=1/p implies p=1/2.5=0.4 so take
p=0.4 to calculate the probabilities
P(X=4)= (1-p)4-1 p = 0.6 3 0.4 = 0.0864
P(X>3) = P(X=4) +P(X=5) +P(X=6)….. = 1- P(X≤3) = 1 – [P(X=1)+P(X=2)+P(X=3)]

Recall that for geometric distribution µ=E(X)=1/p and σ2 =(1-p)/p2 from these we find
µ=2.5 and σ2=0.6/0.16=3.75 and standart deviation= σ = √σ2 = 1.936
Negative Binomial Distribution
Consider the situation in Geometric Distribution, our random variable
was number of trials until the first success. If we generalize this our
question will be number of trials until r success (instead of 1 or first
success) our random variable is said to have Negative Binomial
Distribution. More Formally;
Negative Binomial Distribution
- You are taking a series of multiple choice questions (5 choices) test where you
randomly guess the answer in each question. Then the number of questions (X)
you should solve to get 6 correct answer has Negative Binomial Distribution
with p and r=6.

- We are seeking the minimum of n (number of trials) to get 6 success.


- So p=1/5, (1-p)=4/5 and r=6, find the probability P(x=15)=?
Negative Binomial Distribution
Example: (Web Servers)
- A Web site contains three identical computer servers. Only one is used to
operate the site, and the other two are spares that can be activated in case the
primary system fails. The probability of a failure in the primary computer (or any
activated spare system) from a request for service is 0.0005. Assuming that
each request represents an independent trial, what is the mean number of
requests until failure of all three servers?
Negative Binomial Distribution
Solution: (Web Servers)
- Let X denote the number of requests until all three servers fail, and let X1,X2 and X3 denote the
number of requests before a failure of the first, second, and third servers used, respectively.
Now, we are interested in X=X1+X2+X3.
- Also, the requests are assumed to comprise independent trials with constant probability of
failure p 0.0005. Furthermore, a spare server is not affected by the number of requests before it
is activated. Therefore, X has a negative binomial distribution with p = 0.0005 and r = 3.
Consequently,
E(X) = 3/0.0005 = 6000 requests
- What is the probability that all three servers fail within five requests? The probability is P(X≤5)
and because X denotes the number of requests to the third failure P(X ≤ 2) = 0. Therefore,
P(X≤5) = P(X=3) + P(X=4) + P(X=5)
3 4
= 0.00053 + 0.00053(0.9995) + 0.00053(0.9995)2
2 2
= 1.249 x 10-9
Hypergeometric Distribution
Hypergeometric Distribution
Hypergeometric Distribution
Example:
A listing of customer accounts at a large corporation contains 1000
customers. Of these, 700 have purchased at least one of the
corporation’s products in the last three months. To evaluate a new
product design, 50 customers are sampled at random from the
corporate listing. What is the probability that more than 45 of the
sampled customers have purchased from the corporation in the
last three months?
Hypergeometric Distribution
Solution:
The sampling is without replacement. However, because the sample size of 50
is small relative to the number of customer accounts, 1000, the probability of
selecting a customer who has purchased from the corporation in the last three
months remains approximately constant as the customers are chosen.
Let A denote the event that the first customer selected has purchased from the
corporation in the last three months, and let B denote the event that the
second customer selected has purchased from the corporation in the last
three months. Then, P(A)=700/1000=0.7 P(B│A)=699/999=0.6997. That is, the
trials are approximately independent.
Let X denote the number of customers in the sample who have purchased from
the corporation in the last three months. Then, X is a hypergeometric random
variable with N =1,000, n = 50, and K = 700. Consequently, p = K/N = 0.7.
Hypergeometric Distribution
Solution:
The requested probability is P(X>45). Because the sample size is
small relative to the batch size, the distribution of X can be
approximated as binomial with n = 50 and p = 0.7. Using the
binomial approximation to the distribution of X results in

50 50_𝑥
P(X>45) = σ50
46 𝑥
0.7𝑋 1 − 0.7 = 0.00017

• As it is seen from this example If n is small relative to N, the correction is small and the
hypergeometric distribution is similar to the binomial. In this case, a binomial distribution
can effectively approximate the distribution of the number of units of a specified type in the
sample.
Hypergeometric Distribution
10 mins Class Excercise:
Suppose X has a hypergeometric distribution with N = 20, n = 4, and
K = 4. Determine the following;
a) P(X=1)=?
b) P(X=4)=?
c) P(X≤2)=?
d) Mean and Variance of X, namely µ and σ2
Assignment HW2
• Do excercises 3.30, 3.56, 3.82, 3.100, 3.105, 3.171 in the Textbook
• Due Next Sunday at 23:00
• Send me via TEAMS (Word or PDF)
• Filename should be standart in the following format as before

HW#sStudent Id.doc

Watch Video(s):On Discrete Prob Distributions


https://www.youtube.com/watch?v=oHcrna8Fk18&list=PLvxOuBpaz
msNIHP5cz37oOPZx0JKyNszN

You might also like