Lab 5 Pre-Lab and Exercises (1)

pdf

School

University of Calgary *

*We aren’t endorsed by this school

Course

213

Subject

Statistics

Date

Apr 3, 2024

Type

pdf

Pages

6

Uploaded by trist8182

Report
Statistics 213 Lab Exercises 5 – Discrete Distributions © Jim Stallard, Scott Robison, and Claudia Mahler 2019 all rights reserved. Pre-Lab Exercise 1: Consider the following situation: a statistician estimates that 20% of all real estate agents in Calgary have had an unprofessional conduct complaint filed against them. A random sample of 45 real estate agents who currently practice in Calgary was recently taken. Notice that the binomial distribution will model this situation well! We have 45 independent “trials” (the 45 real estate agents) and any given agent has the same probability of having had an unprofessional conduct complaint filed against them. Thus, in the context of a binomial model, and . We can find the probability of any given number of successes, , out of the total number of trials, , with the following equation: a. What is the probability that ten of the sampled real estate agents have had a complaint filed against them? To calculate this probability using R, we will be using the dbinom() function for a binomial distribution. This function has the following arguments: dbinom(x, size, prob) where size is your number of trials , prob is your probability of success , and x relates to , the number of successes. When we are trying to calculate an “exactly equals” probability like , we need to enter x as our x . So for the probability , the following code is used:
dbinom(x = 10, size = 45, prob = 0.20) ## [1] 0.1325152 So . b. What is the probability that at most ten of the sampled real estate agents have had a complaint filed against them? We can also calculate this probability using R by slightly modifying our previous code. When we are trying to calculate a “left tail” probability of , we need to use pbinom(q, size, prob) and enter x as our q . So for the probability , the following code is used: pbinom(q = 10, size = 45, prob = 0.2) ## [1] 0.7204707 So . c. What is the probability that between 12 and 18 of the sampled real estate agents have had a complaint filed against them? When we are trying to calculate a “middle” probability like , we need to treat this as two separate pbinom() calculations: pbinom(q = b, size, prob) - pbinom(q = (a-1), size, prob) . So for the probability , the following code is used: pbinom(q = 18, size = 45, prob = 0.2) - pbinom(q = 11, size = 45, prob = 0.2)
## [1] 0.1735567 So . Pre-Lab Exercise 2: Consider the following situation: on a typical hot summer afternoon, the number of cars arriving per minute at the drive- thru window of Peter’s Drive-In follows a Poisson distribution with cars. Recall the Poisson distribution formula, which allows us to find the probability of a given number of successes, , when we would typically expect successes. a. What is the probability that in a given 1-minute interal, exactly three cars will join the drive-thru line? We will be using the dpois() and ppois() functions for the Poisson distribution. These functions have the following arguments: dpois(x, lambda) where x relates to , the number of successes and lambda is your lambda and this gives . ppois(q, lambda) where q relates to , the number of successes and lambda is your lambda and this gives . So for the probability , the following code is used: dpois(x = 3, lambda = 3.6) ## [1] 0.2124693 So . b. What is the probability that in a given 1-minute interval, at least three cars will join the drive-thru line?
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
When we are trying to calculate a “right tail” probability of , we need to use 1 - ppois(q, lambda) and (x-1) as our q . So for the probability , the following code is used: 1 - ppois(q = 2, lambda = 3.6) ## [1] 0.6972532 So . c. What is the probability that in a given 5-minute interval, between 13 and 15 cars will join the drive-thru line? Note that we have to be careful here…our original success rate was given interms of 1-minute intervals; now we’re considering 5-minute intervals. Thus, we must re-parametrize . Doing so should give us a new of cars per 5 minutes. When you calculate the corresponding probability, make sure to adjust your ! For the probability , the following code is used: ppois(q = 15, lambda = 18) - ppois(q = 12, lambda = 18) ## [1] 0.1949837 So . Lab Exercise 1: A local outfitter has 32 kayaks available for weekend rental. On any given weekend, the outfitter takes 40 reservations for the 32 kayaks, since he experiences “no-shows,” or people who have reservations but do not pick up their kayak. He estimates that the probability of any reservation being a no-show is 0.30. As a result, the outfitter faces the possibility of “overbooking.” In such a case, any person making a reservation for a kayak but who finds himself or herself without an available kayak is provided with a free rental the following weekend. a. What is the probability that the outfitter rents only 25 kayaks on a given weekend? b. What is the probability that every person showing up to pick up his or her reserved kayak will have a kayak available for them for the weekend?
c. What is the probability that the outfitter overbooks? “Overbooking” means that the outfitter has more than 32 reservations that are kept. d. How many kayaks should the outfitter expect to rent on the weekend? What is the standard deviation of the number of kayaks the outfitter will rent on the weekend? Lab Exercise 2: The number of customer service inquiries that a help-desk receives in a given hour during normal business hours (Monday through Friday, 08:00 - 17:00) is a random variable that can be modeled by the Poisson distribution with a rate of 8.4 calls per hour. a. What does this rate represent? Explain your answer. Think about what is for a Poisson process. It is the typical or average quantity we will observe… b. What is the probability that the help desk will receive… i) Six calls in a given hour? ii) Between five and 10 calls (inclusive) in a given hour? iii) three calls in 30 minutes? c. During the first hour of a day (08:00 - 09:00), the help-desk receives 16 calls. Does this suggest that the number of calls that the help-desk receives is higher than 8.4? Use probability to support your answer. Think about whether this is a “rare” or “unusual” event assuming that Lab Exercise 3: Suppose I give you a list of 20 problems to study, from which I will randomly pick 14 to be on the first midterm exam. For whatever reason, you prepare for the exam by completing and understanding how to solve 11 of the 20 questions (so there are nine questions you do not know how to solve).
a. What is the probability that you completely solve eight of the 14 questions appearing on the midterm exam? When we are trying to calcuate an “exactly equals” probability like for a hypergeometric random variable, we will be using the dhyper() function. This function has the following arguments: dhyper(x, m, n, k) where x is the number of success of interest , m is the total number of “successes” in the population, n is the total number of “failures” in the population, and k is the size of the sample being selected from the population. b. To pass the midterm exam, you must correctly solve at least half of the 14 questions. What is the probability of you passing the midterm exam? When we are trying to calcuate “tail” probability like or for a hypergeometric random variable, we will be using the phyper() function. This function has the following arguments: phyper(x, m, n, k) It is used just like the dhyper() function, except it returns the probability (the “left-tail” probability) for whatever value you enter as x . Use the skills you have learned in this lab to complete the lab quiz.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help