1. Ten percent of the items produced by a machine are defective. Out of 15 items chosen at random,
  1. what is the probability that exactly 3 items will be defective?

Ans.

     dbinom(3,15,0.1)
## [1] 0.1285054
  1. what is the probability that less than 3 items will be defective?

Ans.

     pbinom(2,15,0.1)
## [1] 0.8159389
  1. what is the probability that exactly 11 items will be non-defective?

Ans.

     dbinom(4,15,0.1)
## [1] 0.04283515
  1. Shoppers enter Hamilton Place Mall at an average of 120 per hour.
  1. What is the probability that exactly 5 shoppers will enter the mall between noon and 12:05 p.m.?

Ans.

     dpois(5,10)
## [1] 0.03783327
  1. What is the probability that at least 35 shoppers will enter the mall between 5:00 and 5:10 p.m.?

Ans.

     1-ppois(34,20)
## [1] 0.001489034

3.Scores on a recent national statistics exam were normally distributed with a mean of 80 and a standard deviation of 6.

  1. What is the probability that a randomly selected exam will have a score of at least 71?

Ans.

      1-pnorm(71,80,6)
## [1] 0.9331928
  1. What percentage of exams will have scores between 89 and 92?

Ans.

      pnorm(92,80,6)-pnorm(89,80,6)
## [1] 0.04405707
  1. If the top 2.5% of test scores receive merit awards, what is the lowest score eligible for an award?

Ans.

     qnorm(0.975,80,6)
## [1] 91.75978
  1. If there were 334 exams with scores of at least 89, how many students took the exam?

Ans.

     334/(1-pnorm(89,80,6))
## [1] 4999.461

4.The price of a bond is uniformly distributed between $80 and $85.

  1. What is the probability that the bond price will be at least $83?

Ans.

     1-punif(83,80,85)
## [1] 0.4
  1. What is the probability that the bond price will be between $81 to $90?

Ans.

     punif(85,80,85) - punif(81,80,85)
## [1] 0.8

5.The time between arrivals of customers at the drive-up window of a bank follows an exponential probability distribution with a mean of 10 minutes.

  1. What is the probability that the arrival time between customers will be 7 minutes or less?

Ans.

     pexp(7,1/10)
## [1] 0.5034147
  1. What is the probability that the arrival time between customers will be between 3 and 7 minutes?

Ans.

     pexp(7,1/10)-pexp(3,1/10)
## [1] 0.2442329
  1. The average starting salary for this year’s graduates at a large university (LU) is $20,000 with a standard deviation of $8,000. Furthermore, it is known that the starting salaries are normally distributed.
  1. What is the probability that a randomly selected LU graduate will have a starting salary of at least $30,400?

Ans.

1-pnorm(30400,20000,8000)
## [1] 0.09680048
  1. Individuals with starting salaries of less than $15,600 receive a low income tax break. What percentage of the graduates will receive the tax break?

Ans.

pnorm(15600,20000,8000)
## [1] 0.2911597
  1. What are the minimum and the maximum starting salaries of the middle 95% of the LU graduates?

Ans.

minimum = round(qnorm(0.025,20000,8000),0)
maximum = round(qnorm(0.975,20000,8000),0)
cat(sprintf("\nMinimum Salary = %d",minimum))
## 
## Minimum Salary = 4320
cat(sprintf("\nMaximum Salary = %d",maximum))
## 
## Maximum Salary = 35680
  1. If 189 of the recent graduates have salaries of at least $32,240, how many students graduated this year from this university?

Ans.

total  = round(189/(1-pnorm(32240,20000,8000)),0)
cat(sprintf("\nTotal number of students = %d",total))
## 
## Total number of students = 3000

7.The length of time patients must wait to see a doctor in a local clinic is uniformly distributed between 15 minutes and 2 1/2 hours.

  1. What is the probability of a patient waiting exactly 50 minutes?

Ans. 0

  1. What is the probability that a patient would have to wait between 45 minutes and 2 hours?

Ans.

     punif(120,15,150) - punif(45,15,150)
## [1] 0.5555556
  1. Compute the probability that a patient would have to wait over 2 hours.

Ans.

    1- punif(120,15,150) 
## [1] 0.2222222

8.The salaries at a corporation are normally distributed with an average salary of $19,000 and a standard deviation of $4,000.

  1. What is the probability that an employee will have a salary between $12,520 and $13,480?

Ans.

      pnorm(13480,19000,4000)-pnorm(12520,19000,4000)
## [1] 0.03117718
  1. What is the probability that an employee will have a salary more than $11,880?

Ans.

    1-  pnorm(11880,19000,4000)
## [1] 0.962462
  1. What is the probability that an employee will have a salary less than $28,440?

Ans.

      pnorm(28440,19000,4000)
## [1] 0.9908625

9.The time it takes a worker on an assembly line to complete a task is exponentially distributed with a mean of 8 minutes.

  1. What is the probability that it will take a worker less than 4 minutes to complete the task?

Ans.

     pexp(4,1/8)
## [1] 0.3934693
  1. What is the probability that it will take a worker between 6 and 10 minutes to complete the task?

Ans.

     pexp(10,1/8) - pexp(6,1/10)
## [1] 0.2623068
  1. The life expectancy of Timely brand watches is normally distributed with a mean of four years and a standard deviation of eight months.
  1. What is the probability that a randomly selected watch will be in working condition for more than five years?

Ans.

1-pnorm(60,48,8)
## [1] 0.0668072
  1. The company has a three-year warranty period on their watches. What percentage of their watches will be in operating condition after the warranty period?

Ans.

(1-pnorm(36,48,8))*100
## [1] 93.31928
  1. What is the minimum and the maximum life expectancy of the middle 95% of the watches?

Ans.

minimum = round(qnorm(0.025,48,8),3)
maximum = round(qnorm(0.975,48,8),3)
cat(sprintf("\nMinimum life expectancy = %f months",minimum))
## 
## Minimum life expectancy = 32.320000 months
cat(sprintf("\nMaximum life expectancy = %f months",maximum))
## 
## Maximum life expectancy = 63.680000 months
  1. Ninety-five percent of the watches will have a life expectancy of at least how many months?

Ans.

qnorm(0.05,48,8)
## [1] 34.84117
  1. The time required to assemble a part of a machine follows an exponential probability distribution with a mean of 14 minutes.
  1. What is the probability that the part can be assembled in 7 minutes or less?

Ans.

     pexp(7,1/14)
## [1] 0.3934693
  1. What is the probability that the part can be assembled between 3.5 and 7 minutes?

Ans.

     pexp(7,1/14)-pexp(3.5,1/14)
## [1] 0.1722701
  1. A life insurance company has determined that each week an average of seven claims is filed in its main branch.
  1. What is the probability that during the next week exactly seven claims will be filed?

Ans.

dpois(7,7)
## [1] 0.1490028
  1. What is the probability that during the next week no claims will be filed?

Ans.

dpois(0,7)
## [1] 0.000911882
  1. What is the probability that during the next week fewer than four claims will be filed?

Ans.

ppois(3,7)
## [1] 0.08176542
  1. What is the probability that during the next week at least seventeen claims will be filed?

Ans.

1-ppois(16,7)
## [1] 0.0009581832
  1. A salesperson contacts eight potential customers per day. From past experience, we know that the probability of a potential customer making a purchase is .10.
  1. What is the probability the salesperson will make exactly two sales in a day?

Ans.

     dbinom(2,8,0.1)
## [1] 0.1488035
  1. What is the probability the salesperson will make at least two sales in a day?

Ans.

     1-pbinom(1,8,0.1)
## [1] 0.1868953
  1. What percentage of days will the salesperson not make a sale?

Ans.

     dbinom(0,8,0.1) * 100
## [1] 43.04672
  1. The records of a department store show that 20% of its customers who make a purchase return the merchandise in order to exchange it. In the next six purchases,
  1. what is the probability that three customers will return the merchandise for exchange?

Ans.

dbinom(3,6,0.2)
## [1] 0.08192
  1. what is the probability that four customers will return the merchandise for exchange?

Ans.

dbinom(4,6,0.2)
## [1] 0.01536
  1. what is the probability that none of the customers will return the merchandise for exchange?

Ans.

dbinom(0,6,0.2)
## [1] 0.262144
  1. The average number of calls received by a switchboard in a 30-minute period is 15.
  1. What is the probability that between 10:00 and 10:30 the switchboard will receive exactly 10 calls?

Ans.

dpois(10,15)
## [1] 0.04861075
  1. What is the probability that between 10:00 and 10:30 the switchboard will receive more than 9 calls but fewer than 15 calls?

Ans.

ppois(14,15)-ppois(10,15)
## [1] 0.3471893
  1. What is the probability that between 10:00 and 10:30 the switchboard will receive fewer than 7 calls?

Ans.

ppois(6,15)
## [1] 0.0076319
  1. A survey of a sample of business students resulted in the following information regarding the genders of the individuals and their selected major.
## 
##    Cell Contents
## |-------------------------|
## |                   Count |
## |-------------------------|
## 
## Total Observations in Table:  200 
## 
##              | SelectedMajor 
##       Gender | Management  |  Marketing  |     Others  |  Row Total | 
## -------------|------------|------------|------------|------------|
##         Male |        40  |        10  |        30  |        80  | 
## -------------|------------|------------|------------|------------|
##       Female |        30  |        20  |        70  |       120  | 
## -------------|------------|------------|------------|------------|
## Column Total |        70  |        30  |       100  |       200  | 
## -------------|------------|------------|------------|------------|
## 
##  
## NULL
  1. What is the probability of selecting an individual who is majoring in Marketing?

Ans.

datamatrix =  matrix(c(40,30,10,20,30,70),nrow = 2,ncol = 3)
row.names(datamatrix) = c("Male","Female")
colnames(datamatrix) = c("Management","Marketing","Others")
margin.table(datamatrix,2)/margin.table(datamatrix)
## Management  Marketing     Others 
##       0.35       0.15       0.50

Answer is 0.15.

  1. What is the probability of selecting an individual who is majoring in Management, given that the person is female?

Ans.

datamatrix =  matrix(c(40,30,10,20,30,70),nrow = 2,ncol = 3)
row.names(datamatrix) = c("Male","Female")
colnames(datamatrix) = c("Management","Marketing","Others")
prop.table(datamatrix,1)
##        Management Marketing    Others
## Male         0.50 0.1250000 0.3750000
## Female       0.25 0.1666667 0.5833333

Answer is 0.25

  1. What is the probability that the person is a male and he is majoring in Management?

Ans.

datamatrix =  matrix(c(40,30,10,20,30,70),nrow = 2,ncol = 3)
row.names(datamatrix) = c("Male","Female")
colnames(datamatrix) = c("Management","Marketing","Others")
prop.table(datamatrix)
##        Management Marketing Others
## Male         0.20      0.05   0.15
## Female       0.15      0.10   0.35

Answer is 0.2

  1. What is the probability that the person is a male given that the person is majoring in Management?

Ans.

datamatrix =  matrix(c(40,30,10,20,30,70),nrow = 2,ncol = 3)
row.names(datamatrix) = c("Male","Female")
colnames(datamatrix) = c("Management","Marketing","Others")
prop.table(datamatrix,2)
##        Management Marketing Others
## Male    0.5714286 0.3333333    0.3
## Female  0.4285714 0.6666667    0.7

Answer is 0.571

  1. A bank has the following data on the gender and marital status of 200 customers.
## 
##    Cell Contents
## |-------------------------|
## |                   Count |
## |-------------------------|
## 
## Total Observations in Table:  200 
## 
##               | Sex 
## MaritalStatus |     Male  |   Female  | Row Total | 
## --------------|-----------|-----------|-----------|
##        Single |       20  |       30  |       50  | 
## --------------|-----------|-----------|-----------|
##       Married |      100  |       50  |      150  | 
## --------------|-----------|-----------|-----------|
##  Column Total |      120  |       80  |      200  | 
## --------------|-----------|-----------|-----------|
## 
##  
## NULL
  1. What is the probability of finding a single female customer?

Ans.

datamatrix =  matrix(c(20,100,30,50),nrow = 2,ncol = 2)
colnames(datamatrix) = c("Male","Female")
row.names(datamatrix) = c("Single","Married")
prop.table(datamatrix)
##         Male Female
## Single   0.1   0.15
## Married  0.5   0.25

Answer is 0.15

  1. What percentage of customers is male?

Ans.

datamatrix =  matrix(c(20,100,30,50),nrow = 2,ncol = 2)
colnames(datamatrix) = c("Male","Female")
row.names(datamatrix) = c("Single","Married")
(margin.table(datamatrix,2)/margin.table(datamatrix)) *100
##   Male Female 
##     60     40

Answer is 60%

  1. If a customer is female, what is the probability that she is single?

Ans.

datamatrix =  matrix(c(20,100,30,50),nrow = 2,ncol = 2)
colnames(datamatrix) = c("Male","Female")
row.names(datamatrix) = c("Single","Married")
prop.table(datamatrix,2)
##              Male Female
## Single  0.1666667  0.375
## Married 0.8333333  0.625

Answer is 0.375

  1. Is marital status independent of gender? Explain using probabilities.

Ans.

datamatrix =  matrix(c(20,100,30,50),nrow = 2,ncol = 2)
colnames(datamatrix) = c("Male","Female")
row.names(datamatrix) = c("Single","Married")
cat(sprintf("\nMarginal Probabilities\n"))
## 
## Marginal Probabilities
(margin.table(datamatrix,2)/margin.table(datamatrix)) 
##   Male Female 
##    0.6    0.4
cat(sprintf("\nConditional Probabilities\n"))
## 
## Conditional Probabilities
prop.table(datamatrix,1)
##              Male    Female
## Single  0.4000000 0.6000000
## Married 0.6666667 0.3333333

Since the Marginal and Conditional Probabilities aren’t correspondingly equal, it can be concluded that marital status is not independent of gender.

  1. Forty percent of the students who enroll in a statistics course go to the statistics laboratory on a regular basis. Past data indicates that 65% of those students who use the lab on a regular basis make a grade of A in the course. On the other hand, only 10% of students who do not go to the lab on a regular basis make a grade of A. If a particular student made an A, determine the probability that she or he used the lab on a regular basis.

Ans.

## 
## library(PROBShiny)
## 
## PROBShiny()

Ans. 0.8125

  1. In a recent survey in a Statistics class, it was determined that only 60% of the students attend class on Fridays. From past data it was noted that 98% of those who went to class on Fridays pass the course, while only 20% of those who did not go to class on Fridays passed the course.
  1. What proportion of students is expected to pass the course?

  2. Given that a person passes the course, what is the probability that he/she attended classes on Fridays?

## 
## library(PROBShiny)
## 
## PROBShiny()

Ans. a. 0.668 b. 0.8802

  1. In a city, 60% of the residents live in houses and 40% of the residents live in apartments. Of the people who live in houses, 20% own their own business. Of the people who live in apartments, 10% own their own business. If a person owns his or her own business, find the probability that he or she lives in a house.
## 
## library(PROBShiny)
## 
## PROBShiny()

Ans. 75% or 0.75

21.On a recent holiday evening, a sample of 500 drivers was stopped by the police. Three hundred were under 30 years of age. A total of 250 were under the influence of alcohol. Of the drivers under 30 years of age, 200 were under the influence of alcohol.

Let A be the event that a driver is under the influence of alcohol. Let Y be the event that a driver is less than 30 years old.

  1. Determine P(A) and P(Y).
  2. What is the probability that a driver is under 30 and not under the influence of alcohol?
  3. Are A and Y statistically independent events?
## 
## library(PROBShiny)
## 
## PROBShiny()

Ans. a. P(Y) = 0.6 P(A) = 0.5
b. 0.2

      c.  They are not independent events
      
      
  1. A statistics professor has noted from past experience that a student who follows a program of studying two hours for each hour in class has a probability of 0.9 of getting a grade of C or better, while a student who does not follow a regular study program has a probability of 0.2 of getting a C or better. It is known that 70% of the students follow the study program. Find the probability that a student who has earned a C or better grade, followed the program.
## 
## library(PROBShiny)
## 
## PROBShiny()

Ans. 0.9130

23.A machine is used in a production process. From past data, it is known that 97% of the time the machine is set up correctly. Furthermore, it is known that if the machine is set up correctly, it produces 95% acceptable (non-defective) items. However, when it is set up incorrectly, it produces only 40% acceptable items.

  1. An item from the production line is selected. What is the probability that the selected item is non-defective?

  2. Given that the selected item is non-defective, what is the probability that the machine is set up correctly?

## 
## library(PROBShiny)
## 
## PROBShiny()

Ans. a. 0.9335 b. 0.9871

  1. A survey of business students who had taken the Graduate Management Admission Test (GMAT) indicated that students who have spent at least five hours studying GMAT review guides have a probability of 0.85 of scoring above 400. Students who do not review have a probability of 0.65 of scoring above 400. It has been determined that 70% of the business students review for the test.
  1. Find the probability of scoring above 400.

  2. Find the probability that a student who scored above 400 reviewed for the test.

## 
## library(PROBShiny)
## 
## PROBShiny()

Ans. a. 0.79 b. 0.7532

  1. In a random sample of UTC students 50% indicated they are business majors, 40% engineering majors, and 10% other majors. Of the business majors, 60% were females; whereas, 30% of engineering majors were females. Finally, 20% of the other majors were female.
  1. What percentage of students in this sample was female?

  2. Given that a person is female, what is the probability that she is an engineering major?

## 
## library(PROBShiny)
## 
## PROBShiny()

Ans. a. 44% b. 27.3% or 0.273

  1. Assume you have applied to two different universities (let’s refer to them as Universities A and B) for your graduate work. In the past, 25% of students (with similar credentials as yours) who applied to University A were accepted, while University B accepted 35% of the applicants. Assume events are independent of each other.
  1. What is the probability that you will be accepted in both universities?
  2. What is the probability that you will be accepted to at least one graduate program?
  3. What is the probability that one and only one of the universities will accept you? d.What is the probability that neither university will accept you?
## 
## library(PROBShiny)
## 
## PROBShiny()

Ans. a. 8.8% or 0.88

  1. 51.2% or 0.512

  2. 42.6% or 0.426

  3. 48.8% or 0.488

27.Records of a company show that 20% of the employees have only a high school diploma; 70% have bachelor degrees; and 10% have graduate degrees. Of those with only a high school diploma, 10% hold management positions; whereas, of those having bachelor degrees, 40% hold management positions. Finally, 80% of the employees who have graduate degrees hold management positions.

  1. What percentage of employees holds management positions?
  2. Given that a person holds a management position, what is the probability that she/he has a graduate degree?
## 
## library(PROBShiny)
## 
## PROBShiny()

Ans. a. 38%
b. 21.1% or 0.21

  1. The average starting salary for this year’s graduates at a large university (LU) is $20,000 with a standard deviation of $8,000. Furthermore, it is known that the starting salaries are normally distributed.
  1. What is the probability that a randomly selected LU graduate will have a starting salary of at least $30,400?

Ans.

## 
## library(NDP)
## 
## NDP()
  1. What are the minimum and the maximum starting salaries of the middle 95% of the LU graduates?

Ans.

## 
## library(NDP)
## 
## NDP()
  1. The ticket sales for events held at the new civic center are believed to be normally distributed with a mean of 12,000 and a standard deviation of 1,000.

What is the probability of selling between 9,500 and 11,000 tickets?

Ans.

## 
## library(NDP)
## 
## NDP()