second midterm exam friday, april 17 50 minutes you may bring a cheat sheet with you. charts...

19
CMPT 155 Probability

Upload: belinda-lang

Post on 25-Dec-2015

215 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Second Midterm Exam Friday, April 17 50 minutes You may bring a cheat sheet with you. Charts Regression Solutions to homework 4 are available online

CMPT 155Probability

Page 2: Second Midterm Exam Friday, April 17 50 minutes You may bring a cheat sheet with you. Charts Regression Solutions to homework 4 are available online

Second Midterm ExamFriday, April 1750 minutesYou may bring a cheat sheet with you.

ChartsRegression

Solutions to homework 4 are available online.

Page 3: Second Midterm Exam Friday, April 17 50 minutes You may bring a cheat sheet with you. Charts Regression Solutions to homework 4 are available online

Some conceptsEvent

An observation. e.g., Flip a coin.Outcome

Result of an event. e.g., head/tailProbability

“Chance” of the occurrence of an event. e.g., ½ to get a head/tail

Sample spaceSet of all possible outcomes of an experiment.

e.g., {head, tail}

Page 4: Second Midterm Exam Friday, April 17 50 minutes You may bring a cheat sheet with you. Charts Regression Solutions to homework 4 are available online

Some more conceptsIndependent Events

The outcome of one event does not influence the outcome of the other. e.g., Flip two coins

Mutually Exclusive Events/Outcomese.g., One coin flip cannot result in both a head

and a tail.

Page 5: Second Midterm Exam Friday, April 17 50 minutes You may bring a cheat sheet with you. Charts Regression Solutions to homework 4 are available online

ProbabilityPriori Probability

Known before the event occursp(head in a coin flip) = ½p(rolling 1 on a die) = ?Games are usually based on priori

probabilities.Empirical Probability

Based on actual observations or event occurrences

e.g., What is the proportion of blue M&Ms in a bag?

e.g., proportion of red/white blood cells?Frequency counts are key to calculating

empirical probabilities

Page 6: Second Midterm Exam Friday, April 17 50 minutes You may bring a cheat sheet with you. Charts Regression Solutions to homework 4 are available online

ExamplesDownload SimpleProbability.xlsx

Q1: What is the probability that any family selected at random from among the 2,556 families will have no children?

Q2: What is the probability that any family selected at random from among the 2,556 families will have at least 4 children?

Page 7: Second Midterm Exam Friday, April 17 50 minutes You may bring a cheat sheet with you. Charts Regression Solutions to homework 4 are available online

Some factsThe probabilities of mutually exclusive events

can be added together.The sum of the probabilities of all possible

mutually exclusive probabilities will always be ?.

Page 8: Second Midterm Exam Friday, April 17 50 minutes You may bring a cheat sheet with you. Charts Regression Solutions to homework 4 are available online

ExerciseLay out on a spreadsheet the possible

outcomes of two rolls of a fair die and calculate the following:The probability that two faces of the dice will

equal 7The probability that two faces of the dice will

equal 8 or more

Page 9: Second Midterm Exam Friday, April 17 50 minutes You may bring a cheat sheet with you. Charts Regression Solutions to homework 4 are available online

ExerciseLay out on a spreadsheet the possible outcomes of a

visit by three persons to an emergency room. Calculate the following:The probability of no emergencies out of three arrivalsThe probability of one emergency out of three arrivalsThe probability of two emergencies out of three

arrivalsThe probability of three emergencies out of three

arrivals

What is the probability of each outcome?

Page 10: Second Midterm Exam Friday, April 17 50 minutes You may bring a cheat sheet with you. Charts Regression Solutions to homework 4 are available online

However..The probability of a visit being an emergency

is empirical probability.Download Emergencies.xlsx for historical

records.

Page 11: Second Midterm Exam Friday, April 17 50 minutes You may bring a cheat sheet with you. Charts Regression Solutions to homework 4 are available online

Sequential EventsUnder the assumption of independencep(E1E2E3...En) = p(E1) * p(E2) * p(E3) * ... *

p(En)

Page 12: Second Midterm Exam Friday, April 17 50 minutes You may bring a cheat sheet with you. Charts Regression Solutions to homework 4 are available online

Binomial ProbabilityBinomial is a probability distribution that

describes the behavior of a binary event (yes/no, head/tail, emergency/non-emergency, etc)

BINOMDIST() function

Page 13: Second Midterm Exam Friday, April 17 50 minutes You may bring a cheat sheet with you. Charts Regression Solutions to homework 4 are available online

The BINOMDIST() Function = BINOMDIST(k, n, p, cumulative?)wherek is the number of emergency visits (3, 2, 1,

0)n is the total number of visits observed (3)p is the probability of an emergency (0.646)and 0 or 1 to indicate whether it is actual

probability or the cumulative probability

Page 14: Second Midterm Exam Friday, April 17 50 minutes You may bring a cheat sheet with you. Charts Regression Solutions to homework 4 are available online

Cumulative DistributionAccumulation of the probabilities What is the probability of having at most one

emergency visit?How about at most 2 emergencies? 3

emergencies?

Cumulative binomial function always accumulates from the lowest number to the highest.

Page 15: Second Midterm Exam Friday, April 17 50 minutes You may bring a cheat sheet with you. Charts Regression Solutions to homework 4 are available online

ExerciseA local health department counsels patients

coming to a clinic on cigarette smoking only if they are smokers. History has shown that about 27% of patients are smokes when they first come to the clinic. Assume that the clinic will see 15 patients today.Graph both the Binomial distribution and the

cumulative distributionWhat is the probability that 10 people are smokers?What is the probability that 10 patients or more are

smokers?What is the probability that 5 or fewer patients are

smokers?What is the probability that between 7 and 10

patients (inclusive) are smokers?

Page 16: Second Midterm Exam Friday, April 17 50 minutes You may bring a cheat sheet with you. Charts Regression Solutions to homework 4 are available online

Poisson DistributionThe same clinic example:

On average there is 0.9 persons every 15 minutes.

How often does the nurse have to be prepared to deal with 2 people in any 15 minute interval?

How about 3 or 4 people?

Page 17: Second Midterm Exam Friday, April 17 50 minutes You may bring a cheat sheet with you. Charts Regression Solutions to homework 4 are available online

The POISSON() Function= POISSON(k, λ, cumulative?)wherek is the number of arrivals (1, 2, 3, ...)λ is the average number of arrivals (0.9)and 0 or 1 to indicate whether it is actual

probability or the cumulative probability

Page 18: Second Midterm Exam Friday, April 17 50 minutes You may bring a cheat sheet with you. Charts Regression Solutions to homework 4 are available online

ExampleOn average there is 0.9 persons every 15

minutes.

Graph the Poisson distribution and the cumulative distribution.

Experiment to see how many scores you need to include. (Keep 4 decimal places in the values of the probabilities.)

What is the probability that in any 15 minute interval, two patients show up?

How about 5 or fewer than 5?At least 2?

Page 19: Second Midterm Exam Friday, April 17 50 minutes You may bring a cheat sheet with you. Charts Regression Solutions to homework 4 are available online

ExerciseThe hospital supply room manager found that on

average about 2 gloves in a box are not usable.

Graph the Poisson distribution and the cumulative distribution.

Experiment to see how many scores you need to include. (Keep 4 decimal places in the values of the probabilities.)

What is the probability that in any given box of gloves, only one will not be usable?

How about fewer than 5 will not be usable?At least 2?