Binomial Distribution

The binomial distribution is a discrete probability distribution. It describes the outcome of n independent trials in an experiment. Each trial is assumed to have only two outcomes, either success or failure.

Problem

Suppose there are twelve multiple choice questions in an English class quiz. Each question has five possible answers, and only one of them is correct. Find the probability of having four or less correct answers if a student attempts to answer every question at random.

Solution

Since only one out of five possible answers is correct, the probability of answering a question correctly by random is 1/5=0.2.
We can find the probability of having exactly 4 correct answers by random attempts as follows.
dbinom(4, size = 12, prob = 0.2)
## [1] 0.1328756

To find the probability of having four or less correct answers by random attempts, we apply the function dbinom with x = 0,1,2,3,4.
dbinom(0, size=12, prob=0.2) + 
+ dbinom(1, size=12, prob=0.2) + 
+ dbinom(2, size=12, prob=0.2) + 
+ dbinom(3, size=12, prob=0.2) + 
+ dbinom(4, size=12, prob=0.2) 
## [1] 0.9274445

Alternatively, we can use the cumulative probability function for binomial distribution pbinom.
pbinom(4, size = 12, prob = 0.2)
## [1] 0.9274445

Answer:The probability of four or less questions answered correctly by random in a twelve question multiple choice quiz is 92.7%.

Assignment Problem 01:

Investment Advisors agree that near retirees, defined as people aged 55 to 65, should have balanced portfolios. Most advisors suggest that the near -retirees have no more 50% of their investments in stocks. However, during the huge decline in the stock market in 2008, 22% of near -retirees had 90% or more of their investments in stocks. Suppose you have a random sample of 10 people who have labeled as near -retirees in 2008. What is the probability that during 2008.
a) Zero had 90% or more of their investments in stocks?
b) Exactly one had 90% or more of his investments in stocks?
c) Two or fewer had 90% or more of their investment in stocks?
d) Three or more had 90% or more of their investments in stocks.

Solution

a) Zero had 90% or more of their investments in stocks?
dbinom(0, size = 10, prob = 0.22)
## [1] 0.08335776
b) Exactly one had 90% or more of his investments in stocks?
dbinom(1, size = 10, prob = 0.22)
## [1] 0.2351116
c) Two or fewer had 90% or more of their investment in stocks?
pbinom(2, size = 10, prob = 0.22)
## [1] 0.6168803
d) Three or more had 90% or more of their investments in stocks.
1-(pbinom(2, size = 10, prob = 0.22))
## [1] 0.3831197

Poisson Distribution

A distribution is called Poisson distribution when the following assumptions are valid:

1. Any successful event should not influence the outcome of another successful event.

2. The probability of success over a short interval must equal the probability of success over a longer interval.

3. The probability of success in an interval approaches zero as the interval becomes smaller.

Examples of Poisson Distribution:

1. The number of emergency calls recorded at a hospital in a day.

2. The number of thefts reported in an area on a day.

3. The number of customers arriving at a salon in an hour.

4. The number of suicides reported in a particular city.

5. The number of printing errors at each page of the book.

Problem

If there are twelve cars crossing a bridge per minute on average, find the probability of having seventeen or more cars crossing the bridge in a particular minute

Solution

The probability of having sixteen or less cars crossing the bridge in a particular minute is given by the function ppois.
ppois(16, lambda = 12) # lower tail
## [1] 0.898709
Hence the probability of having seventeen or more cars crossing the bridge in a minute is in the upper tail of the probability density function.
ppois(16, lambda = 12, lower=FALSE) #upper tail
## [1] 0.101291
Answer:If there are twelve cars crossing a bridge per minute on average, the probability of having seventeen or more cars crossing the bridge in a particular minute is 10.1%.

Assignment Problem 02:

Assume that number of network errors experienced in a day on a local area network ( LAN) is distributed as a Poisson random variable. The mean number of network errors experienced in a day is 2.4. What is the probability that in any given day
a) Zero network errors will occur?
b) Exactly one network error will occur?
c) Two or more network error will occur?
d) Fewer than three network errors will occur?

Solution

a) Zero network errors will occur?
dpois(0,lambda = 2.4)
## [1] 0.09071795
b) Exactly one network error will occur?
dpois(1,lambda = 2.4)
## [1] 0.2177231
c) Two or more network error will occur?
1-(ppois(1,lambda = 2.4))
## [1] 0.691559
d) Fewer than three network errors will occur?
ppois(2, lambda = 2.4)
## [1] 0.5697087

Assignment Problem 03:

a) Fewer than five chips part will be found?
b) Exactly five chips parts will be found?
c) Five or more chips part will be found?
d) Either four or five chips part will be found?

Solution:

a) Fewer than five chips part will be found?
ppois(4,lambda = 6)
## [1] 0.2850565
b) Exactly five chips parts will be found?
dpois(5, lambda = 6)
## [1] 0.1606231
c) Five or more chips part will be found?
ppois(4, lambda = 6, lower=FALSE)
## [1] 0.7149435
1-ppois(4,lambda = 6)
## [1] 0.7149435
d) Either four or five chips part will be found?
dpois(4,lambda = 6)+dpois(5,lambda = 6)
## [1] 0.2944758

Normal Distribution

In probability theory and statistics, the normal distribution or Gaussian distribution is a continuous probability distribution that describes data that clusters around a mean or average. The graph of the associated probability density function is bell-shaped, with a peak at the mean, and is known as the Gaussian function or bell curve.

The normal distribution has several interesting characteristics:

> The shape of the distribution is determined by the average, ?? (or X), and the standard deviation, ??.

> The highest point on the curve is the average.

> The distribution is symmetrical about the average.

> As you move away from the average, the points occur with less frequency.

> Most of the area under the curve (99.7%) lies between -3?? and +3?? of the average.

Problem

Assume that the test scores of a college entrance exam fits a normal distribution. Furthermore, the mean test score is 72, and the standard deviation is 15.2. What is the percentage of students scoring 84 or more in the exam?

Solution

We apply the function pnorm of the normal distribution with mean 72 and standard deviation 15.2. Since we are looking for the percentage of students scoring higher than 84, we are interested in the upper tail of the normal distribution.
pnorm(84, mean = 72, sd=15.2, lower.tail = FALSE)
## [1] 0.2149176
Answer: The percentage of students scoring 84 or more in the college entrance exam is 21.5%.

Assignment Problem 04:

In a recent year, about two thirds of US households purchased ground coffee. Consider the annual ground coffee expenditures for households purchasing ground coffee assuming that these expenditures are approximately distributed as a normal random variable with a mean of $65.16 and a Standard Deviation of $10.00
a) Find the probability that a household spent less than $35.00.
b) Find the probability that a household spent more than $60.00.
c) What proportion of the households spent between $40.00 and $50.00?
d) 99% of households spent less than what amount?

Solution:

a) Find the probability that a household spent less than $35.00.
pnorm(35, mean = 65.16, sd=10)
## [1] 0.001280666
b) Find the probability that a household spent more than $60.00.
pnorm(60, mean = 65.16, sd=10, lower.tail = FALSE)
## [1] 0.6970728
c) What proportion of the households spent between $40.00 and $50.00?
pnorm(50, mean = 65.16, sd=10)-pnorm(40, mean = 65.16, sd=10)
## [1] 0.05882492
d) 99% of households spent less than what amount?
qnorm(0.99, mean = 65.16, sd=10)
## [1] 88.42348