Complete the following questions in R Markdown and submit as a single .html file (knitted.)
13 hearts within a 52 deck of cards, 3 of those hearts are face cards so we subtract them from 13 and get 10. The ps(Heart|NotFace) = 10/52
round(10/52,4)
## [1] 0.1923
P(<6)= Possible Outcome/Total # of cases (1,1),(1,2),(1,3),(1,4),(2,1),(2,2),(2,3),(3,1),(3,2),(4,1) =10/36
pr<-10/36
round(pr,4)
## [1] 0.2778
Gender and Residence of Customers Males Females Apartment 233 208 Dorm 159 138 With Parent(s) 102 280 Sorority/Fraternity House 220 265 Other 250 146
What is the probability that a customer is male? Write your answer as a fraction or a decimal number rounded to four decimal places.
AnM<- 233
DnM<- 159
WpnM<-102
SFnM<- 220
OnM<- 250
Total<- 2001
Males<- sum(AnM,DnM,WpnM,SFnM,OnM)
PrM<- (Males/Total)
round(PrM,4)
## [1] 0.4818
Probability that first card is a club= .25 or 1/4 Probability the second card will be a black card= .5 or 1/2 Probability the third card will be a face card = .23 or 3/13
prC<-13/52
prC
## [1] 0.25
Pr2B<-26/52
Pr2B
## [1] 0.5
Pr3F<-12/52
round(prC*Pr2B*Pr3F,4)
## [1] 0.0288
PrH<- 13/52
PrS<-13/51
PrHandPrS<-(PrH*PrS)
round(PrHandPrS/PrH,4)
## [1] 0.2549
Probability of drawing a heart = 1/52 Then without replacement drawing a red= 26/51
PrH<-13/52
PrR<-25/51
round(PrH*PrR,4)
## [1] 0.1225
Students in a Basic Math Class Males Females Freshmen 12 12 Sophomores 19 15 Juniors 12 4 Seniors 7 4
What is the probability that a junior female and then a freshmen male are chosen at random? Write your answer as a fraction or a decimal number rounded to four decimal places.
PrFJ<- 4/85
PrFM<- 12/84
PAnB<- round(PrFJ*PrFM,4)
PAnB
## [1] 0.0067
Step 1. What is the probability that a randomly chosen applicant has a graduate degree, given that they are male? Enter your answer as a fraction or a decimal rounded to four decimal places.
PrM<- 141/300
PrDM<- 52/300
round(PrDM/PrM,4)
## [1] 0.3688
Step 2. If 102 of the applicants have graduate degrees, what is the probability that a randomly chosen applicant is male, given that the applicant has a graduate degree? Enter your answer as a fraction or a decimal rounded to four decimal places.
PrMgD<-102/300
round(PrDM/PrMgD,4)
## [1] 0.5098
d<-6
s<-5
c<-3
VM<-d*s*c
VM
## [1] 90
A doctor visits her patients during morning rounds. In how many ways can the doctor visit 5 patients during the morning rounds?factorial(5)
## [1] 120
A coordinator will select 5 songs from a list of 8 songs to compose an event's musical entertainment lineup. How many different lineups are possible?Permutation 8 pick 5
n<-8
n1<-factorial(n)
r<-5
r1<-factorial(n-r)
result<-n1/r1
result
## [1] 6720
A person rolls a standard six-sided die 9 times. In how many ways can he get 3 fours, 5 sixes and 1 two?a<- factorial(9)
b<- factorial(3)
c<- factorial(5)
r<- a/(b*c)
r
## [1] 504
How many ways can Rudy choose 6 pizza toppings from a menu of 14 toppings if each topping can only be chosen once?Combination 14 choose 6
install.packages('gtools',repos = "http://cran.us.r-project.org")
## Installing package into 'C:/Users/mm19975/OneDrive - MassMutual/MyDocuments/R/win-library/4.0'
## (as 'lib' is unspecified)
## package 'gtools' successfully unpacked and MD5 sums checked
##
## The downloaded binary packages are in
## C:\Users\mm19975\AppData\Local\Temp\RtmpSGUwvS\downloaded_packages
library('gtools')
result<- combinations(n=14,r=6)
nrow(result)
## [1] 3003
3 cards are drawn from a standard deck of 52 playing cards. How many different 3-card hands are possible if the drawing is done without replacement?nrow(combinations(52,3))
## [1] 22100
You are ordering a new home theater system that consists of a TV, surround sound system, and DVD player. You can choose from 12 different TVs, 9 types of surround sound systems, and 5 types of DVD players. How many different home theater systems can you build?result<-12*9*5
result
## [1] 540
You need to have a password with 5 letters followed by 3 odd digits between 0 - 9 inclusively. If the characters and digits cannot be used more than once, how many choices do you have for your password?library('gtools')
a<- nrow(permutations(n=26,r=5))
a
## [1] 7893600
b<- nrow(permutations(n=10,r=3))
b
## [1] 720
result<- 7893600*720
result
## [1] 5683392000
Evaluate the following expression.
_9 P_4library('gtools')
nrow(permutations(9, 4))
## [1] 3024
Evaluate the following expression.
_11 C_8library('gtools')
nrow(combinations(11,8))
## [1] 165
Evaluate the following expression.
( _12 P_8)/( _12 C_4 )library('gtools')
a<- nrow(permutations(12,8))
a
## [1] 19958400
b<- nrow(combinations(12,4))
b
## [1] 495
result<-19958400/495
result
## [1] 40320
The newly elected president needs to decide the remaining 7 spots available in the cabinet he/she is appointing. If there are 13 eligible candidates for these positions (where rank matters), how many different ways can the members of the cabinet be appointed?library('gtools')
result<- nrow(permutations(13,7))
result
## [1] 8648640
In how many ways can the letters in the word 'Population' be arranged?Letter repeats: 2P, 2O
factorial(10)/4
## [1] 907200
Consider the following data:x 5 6 7 8 9 p(x) 0.1 0.2 0.3 0.2 0.2
x<- c(5,6,7,8,9)
px<- c(.1,.2,.3,.2,.2)
df<- data.frame(x,px)
df
## x px
## 1 5 0.1
## 2 6 0.2
## 3 7 0.3
## 4 8 0.2
## 5 9 0.2
Step 1. Find the expected value E( X ). Round your answer to one decimal place.
exp<- sum(df$x * df$px)
exp
## [1] 7.2
Step 2. Find the variance. Round your answer to one decimal place.
var<- sum((df$x - exp)^2 * df$px)
var
## [1] 1.56
Step 3. Find the standard deviation. Round your answer to one decimal place.
SD<- sqrt(var)
SD
## [1] 1.249
Step 4. Find the value of P(X > 9). Round your answer to one decimal place.
Pr<- 1/5
Pr
## [1] 0.2
Step 5. Find the value of P(X < 7). Round your answer to one decimal place.
Pr<- 3/5
Pr
## [1] 0.6
Suppose a basketball player has made 188 out of 376 free throws. If the player makes the next 3 free throws, I will pay you $23. Otherwise you pay me $4.Step 1. Find the expected value of the proposition. Round your answer to two decimal places.
p<- 188/376
pwin<- (p^3)
pwin
## [1] 0.125
plose<- (1-pwin)
plose
## [1] 0.875
exp<- (pwin*23)-(plose*4)
round(exp,2)
## [1] -0.62
Step 2. If you played this game 994 times how much would you expect to win or lose? (Losses must be entered as negative.)
round(exp*994,2)
## [1] -621.25
Flip a coin 11 times. If you get 8 tails or less, I will pay you $1. Otherwise you pay me $7.Step 1. Find the expected value of the proposition. Round your answer to two decimal places.
P(x>8)
pwin<- pbinom(8,11,.5)
pwin
## [1] 0.9672852
plose<- 1-pwin
exp<- (pwin*1) - (plose*7)
round(exp,2)
## [1] 0.74
Step 2. If you played this game 615 times how much would you expect to win or lose? (Losses must be entered as negative.)
round(exp*615,2)
## [1] 454.04
If you draw two clubs on two consecutive draws from a standard deck of cards you win $583. Otherwise you pay me $35.(Cards drawn without replacement.)Step 1. Find the expected value of the proposition. Round your answer to two decimal places.
pwin<- round((13/52) * (12/51),2)
plose<- 1-pwin
exp<- (pwin*583)-(plose*35)
exp
## [1] 2.08
Step 2. If you played this game 632 times how much would you expect to win or lose? (Losses must be entered as negative.)
exp*632
## [1] 1314.56
A quality control inspector has drawn a sample of 10 light bulbs from a recent production lot. If the number of defective bulbs is 2 or less, the lot passes inspection. Suppose 30% of the bulbs in the lot are defective. What is the probability that the lot will pass inspection? (Round your answer to 3 decimal places)P(x<2)
p<- pbinom(2,10,.3)
round(p,3)
## [1] 0.383
A quality control inspector has drawn a sample of 5 light bulbs from a recent production lot. Suppose that 30% of the bulbs in the lot are defective. What is the expected value of the number of defective bulbs in the sample? Do not round your answer. s<- 5
s*3
## [1] 15
The auto parts department of an automotive dealership sends out a mean of 5.5 special orders daily. What is the probability that, for any day, the number of special orders sent out will be more than 5? (Round your answer to 4 decimal places)P(X>5)
round(ppois(5,5.5,lower.tail = F),4)
## [1] 0.4711
At the Fidelity Credit Union, a mean of 5.7 customers arrive hourly at the drive-through window. What is the probability that, in any hour, more than 4 customers will arrive? (Round your answer to 4 decimal places)round(ppois(4,5.5,lower.tail = F),4)
## [1] 0.6425
The computer that controls a bank's automatic teller machine crashes a mean of 0.4 times per day. What is the probability that, in any 7-day week, the computer will crash no more than 1 time? (Round your answer to 4 decimal places)P(x<=1)
lambda<- .4*7
round(ppois(1,p),4)
## [1] 0.943
round(phyper(q=1, m=6, n=19, k=8, lower.tail = F ),3)
## [1] 0.651
round(phyper(q=6, m=10, n=15, k=8), 3)
## [1] 0.998
The weights of steers in a herd are distributed normally. The variance is 40,000 and the mean steer weight is 1300 lbs. Find the probability that the weight of a randomly selected steer is greater than 979 lbs. (Round your answer to 4 decimal places)P(X>979)
x<-979
mu<-1300
var<-30000
z<- (x-mu)/(sqrt(var))
round(pnorm(z,lower.tail = F),4)
## [1] 0.9681
SVGA monitors manufactured by TSI Electronics have life spans that have a normal distribution with a variance of 1,960,000 and a mean life span of 11,000 hours. If a SVGA monitor is selected at random, find the probability that the life span of the monitor will be more than 8340 hours. (Round your answer to 4 decimal places)P(x>8340)
SD=sqrt(1960000)
mu=11000
x=8340
z<- (x-mu)/SD
round(pnorm(z,lower.tail = F),4)
## [1] 0.9713
Suppose the mean income of firms in the industry for a year is 80 million dollars with a standard deviation of 3 million dollars. If incomes for the industry are distributed normally, what is the probability that a randomly selected firm will earn between 83 and 85 million dollars? (Round your answer to 4 decimal places)83<P(X)<85
round(pnorm(85, mean=80, sd=3)-pnorm(83, mean=80,sd=3),4)
## [1] 0.1109
Suppose GRE Verbal scores are normally distributed with a mean of 456 and a standard deviation of 123. A university plans to offer tutoring jobs to students whose scores are in the top 14%. What is the minimum score required for the job offer? Round your answer to the nearest whole number, if necessary.p(X>14%)
round(qnorm(.14, 456, 123, lower.tail = F),0)
## [1] 589
The lengths of nails produced in a factory are normally distributed with a mean of 6.13 centimeters and a standard deviation of 0.06 centimeters. Find the two lengths that separate the top 7% and the bottom 7%. These lengths could serve as limits used to identify which nails should be rejected. Round your answer to the nearest hundredth, if necessary.P(X>.07)
round(qnorm(.07,6.13,.06,lower.tail = F),2)
## [1] 6.22
An English professor assigns letter grades on a test according to the following scheme.
A: Top 13% of scores B: Scores below the top 13% and above the bottom 55% C: Scores below the top 45% and above the bottom 20% D: Scores below the top 80% and above the bottom 9% F: Bottom 9% of scores Scores on the test are normally distributed with a mean of 78.8 and a standard deviation of 9.8. Find the numerical limits for a C grade. Round your answers to the nearest whole number, if necessary..2<P(X)<.45
lower.bound<- round(qnorm(.2,78.8,9.8),0)
upper.bound<- round(qnorm(.45,78.8,9.8,lower.tail = F),0)
limits<-c(lower.bound,upper.bound)
limits
## [1] 71 80
Suppose ACT Composite scores are normally distributed with a mean of 21.2 and a standard deviation of 5.4. A university plans to admit students whose scores are in the top 45%. What is the minimum score required for admission? Round your answer to the nearest tenth, if necessary.P(x>.45)
round(qnorm(.45,21.2,5.4,lower.tail = F),1)
## [1] 21.9
Consider the probability that less than 11 out of 151 students will not graduate on time. Assume the probability that a given student will not graduate on time is 9%. Approximate the probability using the normal distribution. (Round your answer to 4 decimal places.)P(x<11)
p<-11/151
round(1-pnorm(pbinom(11,151,p)),4)
## [1] 0.2812
The mean lifetime of a tire is 48 months with a standard deviation of 7. If 147 tires are sampled, what is the probability that the mean of the sample would be greater than 48.83 months? (Round your answer to 4 decimal places)P(x>48.83)
n<-147
sd<- 7
sd_xbar<- sd/sqrt(n)
round(pnorm(48.83,48,sd_xbar, lower.tail = F),4)
## [1] 0.0753
The quality control manager at a computer manufacturing company believes that the mean life of a computer is 91 months, with a standard deviation of 10. If he is correct, what is the probability that the mean of a sample of 68 computers would be greater than 93.54 months? (Round your answer to 4 decimal places)P(x>93.54)
n<-68
sd<- 10
sd_xbar<- sd/sqrt(n)
round(1-pnorm(93.54,91,sd_xbar,lower.tail = T),4)
## [1] 0.0181
A director of reservations believes that 7% of the ticketed passengers are no-shows. If the director is right, what is the probability that the proportion of no-shows in a sample of 540 ticketed passengers would differ from the population proportion by less than 3%? (Round your answer to 4 decimal places)P(x<.03)
pop<-540
sd<- sqrt(.07*(1-.07)/pop)
p1<-.07+.03
p2<-.07-.03
round(pnorm(p1,.07,sd)-pnorm(p2,.07,sd),4)
## [1] 0.9937
A bottle maker believes that 23% of his bottles are defective. If the bottle maker is accurate, what is the probability that the proportion of defective bottles in a sample of 602 bottles would differ from the population proportion by greater than 4%? (Round your answer to 4 decimal places)P(x>.04)
pop<-602
m<-.23
p1<- m+.04
p2<- m-.04
sd<-sqrt(.23*(1.23)/pop)
1-round(pnorm(p1,m,sd, lower.tail = T)-pnorm(p2,m,sd,lower.tail = T),4)
## [1] 0.065
A research company desires to know the mean consumption of beef per week among males over age 48. Suppose a sample of size 208 is drawn with x ̅ = 3.9. Assume sigma = 0.8 . Construct the 80% confidence interval for the mean number of lb. of beef per week among males over 48. (Round your answers to 1 decimal place) P(X)
n<-208
df<-n-1
xbar<-3.9
sigma<- .8
z<-qt(.10,df)^2
lower.bound<-round(xbar-z*(sigma/sqrt(n)),1)
upper.bound<-round(xbar+z*(sigma/sqrt(n)),1)
CI<- c(lower.bound,upper.bound)
CI
## [1] 3.8 4.0
An economist wants to estimate the mean per capita income (in thousands of dollars) in a major city in California. Suppose a sample of size 7472 is drawn with x ̅ = 16.6. Assume Sigma = 11 . Construct the 98% confidence interval for the mean per capita income. (Round your answers to 1 decimal place) n<-7472
df<-n-1
xbar<-16.6
sigma<- 11
z<-qt(.02,df)
lower.bound<-round(xbar-z*(sigma/sqrt(n)),1)
upper.bound<-round(xbar+z*(sigma/sqrt(n)),1)
CI<- c(lower.bound,upper.bound)
CI
## [1] 16.9 16.3
Find the value of t such that 0.05 of the area under the curve is to the left of t. Assume the degrees of freedom equals 26.Step 1. Choose the picture which best describes the problem.
upper right graph on the right
Step 2. Write your answer below.
t<-.05
df<-26
round(qt(t,df),4)
## [1] -1.7056
The following measurements (in picocuries per liter ) were recorded by a set of helium gas detectors installed in a laboratory facility:
383.6, 347.1, 371.9, 347.6, 325.8, 337 Using these measurements, construct a 90% confidence interval for the mean level of helium gas present in the facility. Assume the population is normally distributed.helium<- c(383.6, 347.1, 371.9, 347.6, 325.8, 337)
n<- 6
df<-n-1
Step 1. Calculate the sample mean for the given sample data. (Round answer to 2 decimal places)
m<- round(mean(helium),2)
Step 2. Calculate the sample standard deviation for the given sample data. (Round answer to 2 decimal places)
sd<- round(sd(helium),2)
Step 3. Find the critical value that should be used in constructing the confidence interval. (Round answer to 3 decimal places)
t<-round(abs(qt(.05,df)),3)
t
## [1] 2.015
Step 4. Construct the 90% confidence interval. (Round answer to 2 decimal places)
lower.bound<-round(m-t*(sd/sqrt(n)),2)
upper.bound<-round(m+t*(sd/sqrt(n)),2)
CI<-c(lower.bound,upper.bound)
CI
## [1] 334.34 370.00
A random sample of 16 fields of spring wheat has a mean yield of 46.4 bushels per acre and standard deviation of 2.45 bushels per acre. Determine the 80% confidence interval for the true mean yield. Assume the population is normally distributed. Step 1. Find the critical value that should be used in constructing the confidence interval. (Round answer to 3 decimal places)
n<-16
df<-n-1
xbar<-46.4
sigma<- 2.45
z<-qt(.10,df)
round((z),3)
## [1] -1.341
Step 2. Construct the 80% confidence interval. (Round answer to 1 decimal place)
lower.bound<-round(xbar-z*(sigma/sqrt(n)),1)
upper.bound<-round(xbar+z*(sigma/sqrt(n)),1)
CI<- c(lower.bound,upper.bound)
CI
## [1] 47.2 45.6
A toy manufacturer wants to know how many new toys children buy each year. She thinks the mean is 8 toys per year. Assume a previous study found the standard deviation to be 1.9. How large of a sample would be required in order to estimate the mean number of toys bought per child at the 99% confidence level with an error of at most 0.13 toys? (Round your answer up to the next integer)z <- abs(qnorm(0.005,mean=0, sd = 1))
n<-((z^2 * 1.9^2)/0.13^2)
round(n)
## [1] 1417
A research scientist wants to know how many times per hour a certain strand of bacteria reproduces. He believes that the mean is 12.6. Assume the variance is known to be 3.61. How large of a sample would be required in order to estimate the mean number of reproductions per hour at the 95% confidence level with an error of at most 0.19 reproductions? (Round your answer up to the next integer)z <- abs(qnorm(0.025,mean=12.6, sd = sqrt(3.61)))
n<-((z^2 * 3.61)/0.19^2)
round(n)
## [1] 7878
The state education commission wants to estimate the fraction of tenth grade students that have reading skills at or below the eighth grade level.Step 1. Suppose a sample of 2089 tenth graders is drawn. Of the students sampled, 1734 read above the eighth grade level. Using the data, estimate the proportion of tenth graders reading at or below the eighth grade level. (Write your answer as a fraction or a decimal number rounded to 3 decimal places)
p<-1734/2089
round((1-p),3)
## [1] 0.17
Step 2. Suppose a sample of 2089 tenth graders is drawn. Of the students sampled, 1734 read above the eighth grade level. Using the data, construct the 98% confidence interval for the population proportion of tenth graders reading at or below the eighth grade level. (Round your answers to 3 decimal places)
z<-round(abs(qnorm(.01,0,1)),3)
lower.bound<- round(p-(z*sqrt(p*(1-p)/2089)),3)
upper.bound<- round(p+(z*sqrt(p*(1-p)/2089)),3)
CI<- c(lower.bound,upper.bound)
CI
## [1] 0.811 0.849
An environmentalist wants to find out the fraction of oil tankers that have spills each month.Step 1. Suppose a sample of 474 tankers is drawn. Of these ships, 156 had spills. Using the data, estimate the proportion of oil tankers that had spills. (Write your answer as a fraction or a decimal number rounded to 3 decimal places)
p<- 156/474
round((p),3)
## [1] 0.329
Step 2. Suppose a sample of 474 tankers is drawn. Of these ships, 156 had spills. Using the data, construct the 95% confidence interval for the population proportion of oil tankers that have spills each month. (Round your answers to 3 decimal places)
z<-round(abs(qnorm(.025,0,1)),3)
lower.bound<- round(p-(z*sqrt(p*(1-p)/474)),3)
upper.bound<- round(p+(z*sqrt(p*(1-p)/474)),3)
CI<- c(lower.bound,upper.bound)
CI
## [1] 0.287 0.371