0% found this document useful (0 votes)
15 views47 pages

Acts 372 Unit 2

The document covers discrete probability distributions, focusing on the Binomial and Poisson distributions, including their properties and applications. It provides detailed examples with calculations and R code for determining probabilities associated with these distributions. The content is structured into sections that explain the definitions, formulas, and practical examples for better understanding.

Uploaded by

Tabiri kojo
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)
15 views47 pages

Acts 372 Unit 2

The document covers discrete probability distributions, focusing on the Binomial and Poisson distributions, including their properties and applications. It provides detailed examples with calculations and R code for determining probabilities associated with these distributions. The content is structured into sections that explain the definitions, formulas, and practical examples for better understanding.

Uploaded by

Tabiri kojo
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/ 47

ACTS 372

Software Packages
UNIT 2

Emmanuel Harris
[email protected] // 020 2470867
Feb 2016
UNIT 2
• DISCRETE DISTRIBUTIONS

1. BINOMIAL DISTRIBUTION
2. POISSON DISTRIBUTION
3. POISSON APPROXIMATION TO BINOMIAL
4. GEOMETRIC DISTRIBUTION
5. HYPERGEOMETRIC DISTRIBUTION
6. NEGATIVE BINOMIAL DISTRIBUTION

1
DISCRETE PROBABILITY DISTRIBUTIONS
A probability distribution for a discrete random variable X is
a formula, graph, table or any device that specifies the
probability associated with each possible value of X
Discrete Distributions under study
❖ BINOMIAL DISTRIBUTION
❖POISSON DISTRIBUTION
❖GEOMETRIC DISTRIBUTION
❖HYPERGEOMETRIC DISTRIBUTION
❖ NEGATIVE BINOMIAL

2
BINOMIAL DISTRIBUTION
Its used to model experiments consisting of a sequence of
observations of identical and independent trials, each of which
results in one of the possible outcomes.
A random variable X is said to have a Binomial distribution based
on the n trials with probability of success p if and only if
Where 𝑛
𝑃 𝑋=𝑥 = 𝑃𝑥 1 − 𝑃 𝑛−𝑥 , 𝑥 = 0,1,2, … , 𝑛
𝑥
𝜇 = 𝐸 𝑋 = 𝑛𝑝 𝑎𝑛𝑑 𝜎 2 = 𝑉𝑎𝑟 𝑋 = 𝑛𝑝(1 − 𝑝)

In R, we use >dbinom(x,n,p) when finding exactly the probability


of outcomes and we use >pbinom(x,n,p) when finding the
probability of at most X outcomes.
3
Properties of Binomial Distribution

• Each trial can have only two outcomes or outcomes that can be
reduced to two outcomes. The outcomes are usually considered
as a success or a failure.
• There is a fixed number of trials.
• The outcomes of each trial are independent of each other.
• The probability of a success must remain the same for each trial.

4
EXAMPLE
For a random variable 𝑋~𝐵(12, 0.3).Find the following
probabilities,

(i) 𝑃(𝑋 = 4)
(ii) 𝑃 𝑋 < 3
(iii) 𝑃 𝑋 ≤ 3
(iv) 𝑃 𝑋 ≥ 4
(v) 𝑃 𝑋 > 4
(vi) 𝑃 2 < 𝑋 < 6
(vii) 𝑃 2 ≤ 𝑋 < 6
(viii)𝑃 2 ≤ 𝑋 ≤ 6
(ix) 𝑃 2 < 𝑋 ≤ 6
5
12
(i) 𝑃 𝑋 = 4 = 4
0.34 0.78 = 0.23114
R-Code
> dbinom(4,12,0.3)
[1] 0.2311397

(ii) 𝑃 𝑋 < 3 = 𝑃 𝑋 = 0 + 𝑃 𝑋 = 1 + 𝑃 𝑋 = 2
=0.2528
R-Code
> pbinom(2,12,0.3)
[1] 0.2528153

6
(iii)𝑃 𝑋 ≤ 3 = 𝑃 𝑋 = 0 + 𝑃 𝑋 = 1 + 𝑃 𝑋 = 2 + 𝑃 𝑋 = 3
=0.49252

R-Code
> sum(dbinom(0:3,12,0.3))
[1] 0.4925158

(iv) 𝑃 𝑋 ≥ 4 = 1 − 𝑃 𝑋 ≤ 3 = 1 − 0.49252 = 0.50748


R-Code
> sum(dbinom(4:12,12,0.3))
[1] 0.5074842
7
(v) 𝑃 𝑋 > 4 = 1 − 𝑃 𝑋 ≤ 4 = 1 − (0.49252 + 0.23114) = 0.2763
R-Code
> sum(dbinom(5:12,12,0.3))
[1] 0.2763445

(vi) 𝑃 2 < 𝑋 < 6 = 𝑃 𝑋 = 3 + 𝑃 𝑋 = 4 + 𝑃 𝑋 = 5


= 0.62934

R-Code
> sum(dbinom(3:5,12,0.3))
[1] 0.6293359
8
(vii) 𝑃 2 ≤ 𝑋 < 6 = 𝑃 𝑋 = 2 + 𝑃 𝑋 = 3 + 𝑃 𝑋 = 4 +
𝑃 𝑋=5
=0.79713
• R-Code
• > sum(dbinom(2:5,12,0.3))
• [1] 0.7971262

(viii)𝑃 2 ≤ 𝑋 ≤ 6 = 𝑃 𝑋 = 2 + 𝑃 𝑋 = 3 + 𝑃 𝑋 = 4 +
𝑃 𝑋 =5 +𝑃 𝑋 =6
=0.876374
• R-Code
• > sum(dbinom(2:6,12,0.3))
• [1] 0.8763741
9
(ix)𝑃 2 < 𝑋 ≤ 6 = 𝑃 𝑋 = 3 + 𝑃 𝑋 = 4 + 𝑃 𝑋 = 5 + 𝑃 𝑋 = 6
=0.708589
• R-Code
• > sum(dbinom(3:6,12,0.3))
• [1] 0.7085838

10
EXAMPLE
In a certain hospital, 53% of all birth are boys. If six babies born
in this hospital are selected at random, find the probability that:
(A) two of the babies selected are boys
(B) more than four of the babies are selected are boys
(C) at most three are boys
(D) Between 3 and 5 boys inclusive
(E) Fewer than 2 are boys
(F) More than one but less than four are boys

11
Solution
6
(a) 𝑃 𝑋 = 2 = 0.53 2 0.47 4 = 0.20561
2
• R- code
• > dbinom(2,6,0.53)
• [1] 0.2056054

(b) 𝑃 𝑋 > 4 = 𝑃 𝑋 = 5 + 𝑃 𝑋 = 6
6 6
0.53 5 0.47 1 + 0.53 6 0.47 0 = 0.1401
5 6

• R- code
• >sum(dbinom(5:6,6,0.53))
• [1] 0.1400955
12
(c) 𝑃 𝑋 ≤ 3 = 𝑃 𝑋 = 0 + 𝑃 𝑋 = 1 + 𝑃 𝑋 = 2 + 𝑃 𝑋 = 3
=0.59845
• R-Code
• > sum(dbinom(0:3,6,0.53))
• [1] 0.5984534

(d) 𝑃 3 ≤ 𝑋 ≤ 5
6 6 6
0.53 5 0.47 1 + 0.53 4
0.47 2
+ 0.53 3
0.47 3 =0.68852
5 4 3

• R-Code
• > sum(dbinom(3:5,6,0.53))
• [1] 0.688519
13
6
(e) 𝑃 𝑋 < 2 = 𝑃 𝑋 = 0 + 𝑃 𝑋 = 1 = 0.53 0 0.47 6 +
6 0
0.53 0.47 =0.08371
1 5
1

• R-Code
• > pbinom(1,6,0.53)
• [1] 0.08371093

(f) P 1 < X < 4 = P X = 2 + P X = 3


6 2 4 6 3 3
0.53 0.47 + 0.53 0.47 = 0.51474
2 3

• R-Code
• > pbinom(3,6,0.53)-pbinom(1,6,0.53)
• [1] 0.5147425
14
POISSON DISTRIBUTION
The Poisson distribution for a random variable X, representing the
number of occurrence of an event in a given interval of time,
space or volume is defined by
𝝁𝒙 𝒆−𝝁
𝑷 𝒙 = , 𝒙 = 𝟎, 𝟏, 𝟐, . . , 𝒂𝒏𝒅 𝝁 > 𝟎
𝒙!

Where, the mean and variance are equal


𝐸 𝑋 = 𝜇 = 𝑉𝑎𝑟(𝑋)
In R, we use >dpois(x,𝝁) when finding exactly the probability of
outcomes and we use >ppois(x,𝝁) when finding the probability of
at most X outcomes.

15
PROPERTIES
• It consist of counting the number of times a particular event
occurs during a given unit of time, area, volume or space

• The occurrence or the non-occurrence of the event in any


interval of time, space or volume is random and independent
of the occurrence or non-occurrence of the event in any
other interval

• The probability of the occurrence of an event in a given


interval is proportional to the length of the interval

16
EXAMPLE 1
The number of accidents at a certain intersection assumes a poison
distribution with 𝜇 = 3.5. find the following,
(i) 𝑃(𝑋 = 2)
(ii) 𝑃 𝑋 < 2
(iii)𝑃(𝑋 ≤ 2)
(iv)𝑃(𝑋 > 2)
(v) 𝑃(𝑋 ≥ 1)
(vi) 𝑃 1 < 𝑋 < 4
(vii)𝑃(1 ≤ 𝑋 ≤ 4)
(viii)𝑃 1 ≤ 𝑋 < 4
(ix)𝑃(2 < 𝑋 ≤ 5)
17
SOLUTION
3.52 𝑒 −3.5
(i) 𝑃 𝑋 = 2 = = 0.18496
2!
• R-Code
• > dpois(2,3.5)
• [1] 0.184959
3.51 𝑒 −3.5 3.50 𝑒 −3.5
(ii) 𝑃 𝑋 < 2 = 𝑃 𝑋 = 0 + 𝑃 𝑋 = 1 = + = 0.13589
1! 0!

• R-Code
• > ppois(1,3.5)
• [1] 0.1358882
18
(iii) 𝑃 𝑋 ≤ 2 = 𝑃 𝑋 = 0 + 𝑃 𝑋 = 1 + 𝑃 𝑋 = 2
3.50 𝑒 −3.5 3.51 𝑒 −3.5 3.52 𝑒 −3.5
= + + = 0.32085
0! 1! 2!
• R-Code
• > ppois(2,3.5)
• [1] 0.3208472

(v) 𝑃 𝑋 ≥ 1 = 1 − 𝑃 𝑋 < 1 = 1 − 𝑃 𝑋 = 0 = 1 − 0.030197 = 0.969803


• R-Code
• > 1-ppois(0,3.5)
• [1] 0.9698026
19
3.52 𝑒 −3.5 3.53 𝑒 −3.5
(vi) 𝑃 1 < 𝑋 < 4 = 𝑃 𝑋 = 2 + 𝑃 𝑋 = 3 = + =
2! 3!
0.400744
• R-Code
• > sum(dpois(2:3,3.5))
• [1] 0.4007444

(vii) 𝑃 1 ≤ 𝑋 ≤ 4 = 𝑃 𝑋 = 1 + 𝑃 𝑋 = 2 + 𝑃 𝑋 = 3 + 𝑃 𝑋 = 4
= 0.695243
• R-Code
• > sum(dpois(1:4,3.5))
• [1] 0.6952476
20
3.51 𝑒 −3.5 3.52 𝑒 −3.5 3.53 𝑒 −3.5
(viii) 𝑃 1 ≤ 𝑋 < 4 = + + = 0.506435
1! 2! 3!
• R-Code
• > sum(dpois(1:3,3.5))
• [1] 0.5064353

(ix)𝑃 1 < 𝑋 ≤ 4 = 𝑃 𝑋 = 2 + 𝑃 𝑋 = 3 + 𝑃 𝑋 = 4
3.52 𝑒 −3.5 3.53 𝑒 −3.5 3.54 𝑒 −3.5
+ + = 0.58956
2! 3! 4!
• R-Code
• > dpois(2,3.5)+dpois(3,3.5)+dpois(4,3.5)
• [1] 0.5895567
21
EXAMPLE 2
The number of telephone calls received by an office average
4 per minute. Find the probability that;
(A)No call will arrive in a given one-minute period
(B)At least two calls will arrive in a given one- minute period
(c)More than two calls will arrive in a given two-minute period
(d)There will be more than one but less than four arrivals in two-
minute period

22
SOLUTION
40 𝑒 −4
a) 𝑋~𝑃𝑜𝑖𝑠 𝑥, 𝜇 = 4 = 𝑃 𝑋 = 0 = = 0.0183156
0!
• R- Code
• > dpois(0,4)
• [1] 0.01831564

b) 𝑷 𝒙 ≥ 𝟐 = 𝟏 − 𝑷 𝒙 < 𝟐 = 𝟏 − 𝑷 𝑿 = 𝟎 + 𝑷 𝑿 = 𝟏
40 𝑒 −4 41 𝑒 −4
𝟏− ( + ) = 0.90842
0! 1!

• R-Code
• > 1-ppois(1,4)
• [1] 0.9084218
23
Cont’
c) For every two-minute 𝜇 = 2 × 4 = 8
𝑋~𝑃𝑜𝑖𝑠(𝑥, 𝜇 = 8)
𝑃 𝑥 > 2 =1−𝑃 𝑥 ≤2 = 1− 𝑃 𝑋 =0 +𝑃 𝑋 = 1 +𝑃 𝑋 = 2 = 0.98624
• R- Code
• > 1-ppois(2,8)
• [1] 0.986246

(d) 𝑃 1 < 𝑋 < 4 = P X = 2 + P X = 3 = 0.039361

• R-Code
• > sum(dpois(2:3,8))
• [1] 0.03936095

24
POISSON APPROXIMATION TO THE BINOMIAL
The use of binomial for the calculation of certain probabilities
becomes very cumbersome to handle when n is very large and
the probability of success p, becomes very small. Hence, the use
of Poisson distribution to approximate the binomial distribution in
such instances.

Thus, if 𝑋is a binomial random variable with parameters 𝑛 and 𝑝.


If 𝑛 approaches infinity and 𝑝 approaches 0 in such a way that
𝑛𝑝 remains constant at some value > 0 , then
е−𝜆 𝜆𝑥
lim 𝑃(𝑋 = 𝑥) = lim 𝐵(𝑥, 𝑛, 𝑝) = ,𝑥 = 0,1,2, … . Where 𝜆 = 𝑛𝑝
𝑛→∞ 𝑛→∞ 𝑥!
The condition for the approximation is when 𝒏 ≥ 𝟓𝟎 𝒂𝒏𝒅 𝒑 ≤ 𝟎. 𝟏
25
EXAMPLE
In a manufacturing process where glass products are
produced, defects or bubbles occur, occasionally rendering
the piece undesirable for marketing. It is known that on the
average, 1 in every 1000 of these items produced has one or
more bubbles. What is the probability that a random sample of
8000 will yield;

(a) fewer than 3 items possessing bubbles


(b) Exactly 10 possess bubbles
(c) more than 2 items possessing bubbles
(d) Between 3and 6 (inclusive) items possess bubbles
26
SOLUTION
The problem is essentially a binomial experiment with 𝑛 = 8000 𝑎𝑛𝑑 𝑝 = 0.001. since 𝑝 is
close to 0 and 𝑛 is quite large, we approximate with the Poisson distribution using
𝜆 = 8000 × 0.001 = 8 then,
(a) 𝑃 𝑋 < 3 = σ20 b x, 8000,0.001 = P X = 0 + P X = 1 +
P X=2
80 𝑒 −8 81 𝑒 −8 82 𝑒 −8
+ + = 0.013754
0! 1! 2!
• R-code
• > sum(dpois(0:2,8))
• [1] 0.01375397
810 𝑒 −8
(b) 𝑃 𝑋 = 10 = 𝑏 10,8000,0.001 = = 0.099262
10!
• R-Code
• > dpois(10,8)
• [1] 0.09926153
27
CONT’
80 𝑒 −8 81 𝑒 −8 82 𝑒 −8
(c) 𝑷 𝑿 > 𝟐 = 𝟏 − 𝑷 𝑿 ≤ 𝟐 = 𝟏 − + + = 𝟏 − 0.013754 =
0! 1! 2!
0.986246
• R-Code
• > 1-sum(dpois(0:2,8))
• [1] 0.986246
(d) 𝑃 3 ≤ 𝑋 ≤ 6 = 𝑃 𝑋 = 3 + 𝑃 𝑋 = 4 + 𝑃 𝑋 = 5 + 𝑃 𝑋 = 6
83 𝑒 −8 84 𝑒 −8 85 𝑒 −8 86 𝑒 −8
+ + + = 0.2996
3! 4! 5! 6!
• R- Code
• > sum(dpois(3:6,8))
• [1] 0.2996203
28
GEOMETRIC DISTRIBUTION
• Suppose you flip a coin several times. What is the probability
that the first head appears on the third toss? In order to answer
this question and other similar probability questions, the
geometric distribution can be used. The formula for the
probability that the first success occurs on the x th trial is
𝑝(1 − 𝑝)𝑥−1 𝑜𝑟 𝑝 × 𝑞 𝑥−1 𝑓𝑜𝑟 𝑥 = 1,2,3 … … . . , 𝑡𝑜 infinity.
• where p is the probability of a success and x is the trial number
of the first success.
1 𝑞
•𝐸 𝑋 = , 𝑉𝑎𝑟 𝑋 =
𝑃 𝑝2
• In R, we use >dgeom(x-1,𝒑) when finding exactly the probability
of outcomes and we use >pgeom(x-1,𝒑) when finding the
29probability of at most X outcomes.
EXAMPLE
Given that 𝑋 assumes the geometric distribution with probability
of success as 0.28, find the following probabilities,

(i) P(𝑋 = 4)
(ii) P(𝑋 ≥ 3)
(iii) P(𝑋 < 4)
(iv) P(𝑋 > 4)

30
SOLUTION
3
(i) 𝑃 𝑋 = 4 = 0.28 0.72 = 0.10451
• R-Code
• > dgeom(3,0.28)
• [1] 0.1045094

(ii) 𝑃 𝑋 ≥ 3 = 1 − 𝑃 𝑋 ≤ 2 = 1 − [𝑃 𝑋 = 1 + 𝑃 𝑋 = 2 ]
1 − 0.28 0.72 0 + 0.28 0.72 1 = 0.5184
• R-Code
• > 1-pgeom(1,0.28)
• [1] 0.5184

31
(iii) 𝑃 𝑋 < 4 = 𝑃 𝑋 = 1 + 𝑃 𝑋 = 2 + 𝑃 𝑋 = 3
0.28 0.72 0 + 0.28 0.72 1 + 0.28 0.72 2 = 0.626752
• R-Code
• > pgeom(2,0.28)
• [1] 0.626752

(iv) 𝑃 𝑋 > 4 = 1 − 𝑃 𝑋 ≤ 4
1 − [ 0.28 0.72 0 + 0.28 0.72 1 + 0.28 0.72 2 + 0.28 0.72 3

=1 − 0.73126 = 0.2687
• R-Code
• > 1-pgeom(3,.28)
• [1] 0.2687386

32
EXAMPLE 2
A large consignment of items contains 20% that are defective.
Items are drawn until a defective item is found. Find the
probability that;
(a) 4 draws are required
(b) Less than 3 draws are required
(c) At least 2 draws are required
(d)4 to 7 draws are required

33
SOLUTION
𝑋~𝐺𝑒𝑜𝑚(𝑥 − 1, 𝑝 = 0.2)
a) P X = 4 = 0.20 (0.8)3 = 0.1024
• > dgeom(3,0.2)
• [1] 0.1024

b) 𝑃 𝑋 < 3 = 𝑃 𝑋 ≤ 2 = 𝑃 𝑋 = 1 + 𝑃 𝑋 = 2 = 0.20 0.8 1


+
0.20 0.8 0
=0.36
• R-Code
• > pgeom(1,0.2)
• [1] 0.36
34
Cont’
c) 𝑃 𝑋 ≥ 2 = 1 − 𝑃(𝑋 < 2)

• R-code
• > 1-dgeom(0,.2)
• [1] 0.8

(d) 𝑃 4 ≤ 𝑋 ≤ 7 = 𝑃 𝑋 = 4 + 𝑃 𝑋 = 5 + 𝑃 𝑋 = 6 + 𝑃 𝑋 = 7
= 0.30228

• R-Code
• > sum(dgeom(3:6,0.2))
• [1] 0.3022848
35
THE HYPERGEOMETRIC DISTRIBUTION
When a probability experiment has two outcomes and the items
are selected without replacement. When there are two groups
of items such that there are a items in the first group and b items
in the second group, so that the total number of items is a+b=N,
the probability of selecting x items from the first group and k-x
items from the second group is

𝒂 𝑵−𝒂
𝒙 𝒌−𝒙
𝑷 𝑿=𝒙 = 𝑵 , 𝒙 = 𝟎, 𝟏, 𝟐, … , 𝒎𝒊𝒏(𝒂, 𝒌)
𝒌

where k is the total number of items selected without


replacement
36
In R, we use >dhyper(𝐱, 𝒂, 𝑵 − 𝒂, 𝒌) when finding exactly
the probability of outcomes and we use >phyper(𝐱, 𝒂, 𝑵 −
𝒂, 𝒌) when finding the probability of at most X outcomes.

37
EXAMPLE
Among the 120 applicants for a job, only 80 are actually
qualified. If five of the applicants are randomly selected for an
in-depth interview, find the probability that
(a)Only two of the five will be qualified for the job
(b) At most one will be qualified for the job
(c) At least four will be qualified for the job
(d) More than four will be qualified

38
SOLUTION
Using the R-Code 𝑑ℎ𝑦𝑝𝑒𝑟(𝑥, 𝑘, 𝑁 − 𝑘, 𝑛)
80 40
2 3
a) 𝑃 𝑋 = 2 = 120 = 0.1638
5
R-Code
• > dhyper(2,80,40,5)
• [1] 0.1638216
80 40 80 40
b) 𝑃 𝑋 ≤ 1 = 0
120
5
+ 1
120
4
= 0.04182
5 5
• R-Code
• > phyper(1,80,40,5)
39
• [1] 0.04181599
80 40 80 40
(C)𝑃 𝑋 ≥ 4 = 𝑃 𝑋 = 4 + 𝑃 𝑋 = 5 = 4
120
1
+ 5
120
0
= 0.4581
5 5

• R-Code
• > sum(dhyper(4:5,80,40,5))
• [1] 0.458097
80 40
(d)𝑃 𝑋 > 4 = 5
120
0
= 0.12614
5
• R-Code
• dhyper(5,80,40,5)
• [1] 0.1261426

40
THE NEGATIVE BINOMIAL
• If the experiment is repeated indefinitely and the trials are
independent of each other, then the random variable X, the
number of trials at which the 𝑘 𝑡ℎ success occurs, has a
negative binomial distribution with parameters k and p. The
probability mass function of X is
𝑥−1 𝑘 𝑥−𝑘
𝑃 𝑋=𝑥 = 𝑝 1−𝑝 , 𝑥 = 𝑘, 𝑘 + 1, 𝑘 + 2 … ; 0 < 𝑝 < 1
𝑘−1
where p is the probability of success and q is the probability
of success.
• In R, we use >dnbinom(x-k,k,𝒑) when finding exactly the
probability of outcomes and we use >pnbinom(x-k,k,𝒑) when
finding the probability of at most X outcomes.
41
EXAMPLE
In a sequence of independent trials, the probability of success
is 0.3. Find the probability that;
(a)Exactly 10 repetitions are necessary to obtain the third
success
(b)At most 3 repetitions are required to obtain the second
success
(c) Five repetitions are needed to obtain the second success
(d) At least six trials are needed to obtain the fourth success
(e) Two trials are required to obtain the first success

42
Solution
a) x=10, k = 3 Using the 𝑑𝑛𝑏𝑖𝑛𝑜𝑚 𝑥 − 𝑘, 𝑘, 𝑝
10 − 1
𝑃 𝑋 = 10 = 0.3 3 1 − 0.3 7 = 0.080048
3−1
• R-code
• > dnbinom(7,3,.3)
• [1] 0.08004838

b) 𝑘 = 2, 𝑝 = 0.3 and 𝑥 = 2,3 since 𝑥 = 𝑘, 𝑘 + 1, 𝑘 + 2, …


2−1 2 0
3−1
𝑃 𝑋≤3 = 0.3 1 − 0.3 + 0.3 2 1 − 0.3 1 = 0.216
2−1 2−1
R-Code
> dnbinom(0,2,.3)+dnbinom(1,2,.3)
43
[1] 0.216
(c) 𝑥 = 5, 𝑘 = 2, 𝑝 = 0.3
𝑃 𝑋 = 5 = 5−1 2−1
0.3 2 1 − 0.3 3 = 0.12348
• R-Code
• > dnbinom(3,2,0.3)
• [1] 0.12348

(d) 𝑃 𝑋 ≥ 6 = 1 − 𝑃 𝑋 ≤ 5 𝑘 = 4, 𝑝 = 0.3, 𝑥 = 4,5,6, … since 𝑥 = 𝑘, 𝑘 + 1, 𝑘 + 2, …


4−1 4 0
5−1
=1− 0.3 1 − 0.3 + 0.3 4 1 − 0.3 1 = 0.96922
4−1 4−1
• R-Code
• >1-pnbinom(1,4,0.3)
• [1] 0.96922
44
2−1
(e) 𝑃 𝑋 = 2 = 1−1
0.3 1 1 − 0.3 1

= 0.21
• R-code
• > dnbinom(1,1,0.3)
• [1] 0.21

45
Thank You

For any concerns, please contact


[email protected]
[email protected]
0322 191132
Feb 2016

You might also like