Introduction to Business Statistics. Chapter 4

DEPARTMENT OF QUANTITATIVE METHODS & INFORMATION SYSTEMS Introduction to Business Statistics QM 120 Chapter 4 Spring 2008 Chapter 4: Experiment, o...
8 downloads 0 Views 627KB Size
DEPARTMENT OF QUANTITATIVE METHODS & INFORMATION SYSTEMS

Introduction to Business Statistics QM 120 Chapter 4

Spring 2008

Chapter 4: Experiment, outcomes, and sample space 2

¾

Probability and statistics are related in an important way. It is used to allow us to evaluate the reliability of our conclusions about the population when we have only sample information.

¾

Data are obtained by observing either uncontrolled events i nature or controlled in ll d situation i i i laboratory. in l b W use the We h term experiment to describe either method of data collection.

¾

The observation or measurement generated by an experiment may or may not produce a numerical value. Here are some examples: ¾

Recording a test grade

¾

Interviewing a householder to obtain his or her opinion in certain  g p issue.

Chapter 4: Experiment, outcomes, and sample space 3

Table 1: Examples of experiments, outcomes, and sample spaces

¾

Experiment

Outcomes

Sample Space

Toss a coin once

Head, Tail

S = {Head, Tail}

Roll a die once

1, 2, 3, 4, 5, 6

S = {1, 2, 3, 4, 5, 6}

Play a lottery

Win, Lose

S = {Win, Lose}

Select a student

M, F

S = {M,F}

Toss a coin twice

HH, HT, TH, TT

S = {HH, HT, TH, TT}

Venn diagram is a picture that depicts all possible outcomes f an experiment for i t while hil in i tree t di diagram, each h outcome t i is represented a branch of a tree.

Chapter 4: Experiment, outcomes, and sample space 4

HH

● HH

● TH

● HT

● TT

H

Venn Diagram

HT TH

Tree Diagram

T TT

¾

A simple event is the outcome that is observed on a single repetition titi off the th experiment. i t It is i often ft denoted d t d by b E with ith a subscript.

Example: Toss a die and observe the number that appears on the upper face. List the simple event in the experiment. Solution:

Chapter 4: Experiment, outcomes, and sample space 5

¾

We can now define an event (or compound event) as a collection of simple events, often denoted a capital letter.

Example: Tossing a die (continued) E l T i di ( i d) We can define the events A and B as follow, A: Observe an odd number B: Observe a number less than 4 Example: Draw a tree diagram for three tosses of a coin. List  all outcomes for this experiment in a sample space S. Solution

Chapter 4: Experiment, outcomes, and sample space 6

Example: Suppose we randomly select two persons from members of a club and observe whether the person selected is a man or woman. Write all the outcomes from experiment. Draw the Venn and tree diagrams for this experiment. Solution:

¾

Two events are mutually exclusive if, when one event occurs, the other cannot, and vice versa.

¾

The set of all simple events is called the sample space, space S. S

Chapter 4: Calculating Probability 7

¾

¾

Probability is a numerical measure of the likelihood that an event will occur. T Two properties ti off probability b bilit ¾ The probability of an even always lies in the range 0 to 1. 0 ≤ P(Ei) ≤ 1 0 ≤ P(A) ≤ 1  ¾

The sum of the probabilities of all simple events for an experiment,  The sum of the probabilities of all simple events for an experiment denoted by ΣP(Ei), is always 1.

∑ P(Ei) = P(E1) + P(E2) + P(E3) + . . . .  = 1

Chapter 4: Calculating Probability 8

¾

Three conceptual approaches to probability

1. Classical probability ¾

Two or more events that have the same probability of occurrence are  said to be equally likely events said to be equally likely events.

¾

The probability of a simple event is equal to 1 divided by the total  number of all final outcomes for an equally likely experiment.

¾

Classical probability rule to find probability 1 Total number of outcomes Number of outcomes favorable to A P ( A) = Total number of outcomes

P (E i ) =

Chapter 4: Calculating Probability 9

Example: Find the probability of obtaining a head and the probability of obtaining a tail for one toss of a coin. So u io Solution

Chapter 4: Calculating Probability 10

Example: Find the probability of obtaining an even number in one roll of a die. Solution

Chapter 4: Calculating Probability 11

Example: A candy dish contains one green and two red  candies. You close your eyes, choose two candies one at a time  from the dish, and record their colors. What is the probability from the dish, and record their colors. What is the probability  that both candies are red? Solution

Chapter 4: Calculating Probability 12

¾

Calculating the probability of an event: ¾

List all the simple events in the sample space.

¾

Assign an appropriate probability to each simple event.

¾

Determine which simple events result in the event of interest.

¾

Sum the probabilities of the simple events that result in the event  Sum the probabilities of the simple events that result in the event of interest.

Always 1 Include all simple events in 1. the sample space. 2. Assign realistic probabilities to the simple events.

Chapter 4: Calculating Probability 13

Example: A six years boy has a safe box that contains four banknotes: One‐Dinar, Five‐Dinar, Ten‐Dinar, Twenty‐Dinar. His sister which is a three years old girl randomly grabbed three banknotes from the safe box to buy a 30 KD toy. Find the odds (probability) that this girl can buy the toy. Solution

Chapter 4: Calculating Probability 14

2. Relative frequency concept of probability ¾

Suppose we want to know the following probabilities:

¾

The next car coming out of an auto factory is a “lemon”

¾

A randomly selected family owns a home

¾

A randomly selected woman has never smoked A randomly selected woman has never smoked

¾

The outcomes above are neither equally likely nor fixed for each  sample.

¾

The variation goes to zero as n becomes larger and larger

¾

If an experiment is repeated n times and an event A is observed f  times, then

P ( A) =

f n

Chapter 4: Calculating Probability 15

Example: In a group of 500 women, 80 have played golf at least once. Suppose one of these 500 woman is selected. What is the probability that she has played golf at least once Solution

Chapter 4: Calculating Probability 16

Example: Ten of the 500 randomly selected cars manufactured at a certain auto factory are found to be lemons. What is the probability that the next car manufactured at that factory is a lemon? Solution:

Chapter 4: Calculating Probability 17

Example: Lucca Tool Rental would like to assign probabilities to the number of car polishers it rents each day. Office records show the following frequencies of daily rentals for the last 40 days. Number of Polishers Rented

Number of Days

0

4

1

6

2

18

3

10

4

2

Chapter 4: Calculating Probability 18

Solution Number of Polishers Rented

Number of Days

Probability

Chapter 4: Calculating Probability 19

¾

Law of large numbers: If an experiment is repeated again and again, the probability of an event obtained from the relative frequency approaches the actual probability.

3. Subjective probability ¾

¾

Suppose we want to know the following probabilities: ¾

A student who is taking a statistics class will get an A grade

¾

KSE price index will be higher at the end of the day

¾

The Brazilian team will win world cup 2006

Subjective probability is the probability assigned to an event based  Subjective probability is the probability assigned to an event based on subjective judgment, experience, information, and belief.

Chapter 4: Counting Rule 20

¾

Suppose that an experiment involves a large number N of simple events and you know that all the simple events are equally likely. Then each simple event has probability 1/N and the probability of an event A can be calculated as nA N Where n A is the number of simple events that result in event A P ( A) =

¾

The mn rule ¾

Consider an experiment that is performed in two stages. If the first  stage can be performed in m ways and for each of these ways, the  second stage can be accomplished in n ways, then there mn ways to  accomplish the experiment li h th i t

Chapter 4: Counting Rule 21

Example: Suppose you want to order a car in one of three styles and in one of four paint colors. To find out how many options are available, you can think of first picking one of the m = 3 styles and then one of n = 4 colors. Using the mn rule, as shown in the figure below, below you have mn= (3)(4) = 12 possible options.

Style

Color 1 2

1

3 4 1 2

2

3 4 1 2

3

3 4

Chapter 4: Counting Rule 22

¾

The extended mn rule ¾

If an experiment is performed in k stages, with n1 ways to  accomplish the first stage n2 to accomplish the second stage and accomplish the first stage, n2 to accomplish the second stage…, and  nk ways to accomplish the kth stage, the number of ways to  accomplish the experiment is

n1 n2 n3 ...nk Example: A bus driver can take three routes from city A to city B, four routes from city B to city C, and three routes from city C to city i D. D For F traveling li from f A to D, D the h driver di must drive di from A to B to C to D, how many possible routes from A to D are available Example: A medical technician records a person’s blood type p and Rh factor. Calculate the total outcome of this experiment using the mn method and using a tree diagram.

Chapter 4: Counting Rule 23

Example: Ahmad has invested in two stocks, ARC Oil and Coal Mining. Ahmad has determined that the possible outcomes of these investments three months from now are as follows.

Investment Gain or Loss in 3 Months (in €000) C l Mi Coal Mining i A Oil Arc 10 8 5 -2 0 -20

Chapter 4: Counting Rule 24

Solution Ahmad investments can be viewed as a two‐step experiment.  It  A a i es e s ca be ie e as a o s ep e pe i e I involves two stocks, each with a set of experimental outcomes.

ARC Oil: Coal Mining: g Total Number of Experimental Outcomes:

n1 = 4 n2 = 2 n1n2 = (4)(2) = 8

Chapter 4: Counting Rule 25

ARC Oil (Stage 1)

Coal Mining (Stage 2)

Experimental Outcomes Gain 8

(10, 8)

Gain €18,000

(10, -2)

Gain

Gain 8

(5 8) (5,

G i €13,000 Gain €13 000

Lose 2

(5, -2)

Gain

€3,000

(0 8) (0,

Gain

€8 000 €8,000

(0, -2)

Lose

€2,000

Gain 8

(-20 8) (-20,

Lose €12,000 €12 000

Lose 2

(-20, -2)

Lose €22,000

Lose 2

Gain 10

Gain 5

Gain 8

Even Lose 20

Lose 2

€8,000

Chapter 4: Counting Rule 26

¾

A counting rule for permutations (orderings) ¾

The number of ways we can arrange n distinct objects, taking them  r at a time is r at a time, is

n! P =n Pr = (n − r))! wheren!= n(n −1)(n − 2).....(3)(2)(1) and 0!= 1 n r

¾

A counting g rule for combination ¾

The number of distinct combinations of n distinct objects that can  be formed, taking them r at a time, is

n! nCr= C = ( ) = r!(n − r )! n r

n r

Chapter 4: Counting Rule 27

¾

Permutations: Given that position (order) is important, if one has 5 different objects (e.g. A, B, C, D, and E), how many unique ways can they be placed in 3 positions (e.g. ADE, AED, DEA, DAE, EAD, EDA, ABC, ACB, BCA, BAC etc.)

¾

Combinations: C bi i If one has h 5 different diff objects bj ( (e.g. A B, A, B C, C D, D and E), how many ways can they be grouped as 3 objects when position does not matter (e.g. ABC, ABD, ABE, ACD, ACE, ADE are correct but CBA is not ok as is equal to ABC)

Chapter 4: Marginal & Conditional Probabilities 28

¾

Suppose all 100 employees of a company were asked whether they are in favor of or against paying high salaries to CEOs of U.S. U S companies. companies The following table gives a two two‐ way classification of their responses. In favor

Against

Male

15

45

60

Female

4

36

40

19

81

100

Total

¾

Total

Marginal probability is the probability of a single event without consideration of any other event

Chapter 4: Marginal & Conditional Probabilities 29

¾

Suppose one employee is selected, he/she maybe classified either on the bases of gender alone or on the bases of opinion.

¾

The probability of each of the following event is called marginal probability

¾

Suppose the employee selected is known to be male. What is the probability that he is in favor?

Chapter 4: Marginal & Conditional Probabilities 30

¾

This probability is called conditional probability and is written as “the probability that the employee selected is in favor given that he is a male. male.”

P( in favor | male ) The event whose probability is to be determined ¾

This event has already occurred

Read as “given”

Conditional probability is the probability that an even will occur given that another event has already occurred. If A and B are two events, then the conditional probability of A given B is written as P(A (A | B )

Chapter 4: Marginal & Conditional Probabilities 31

Example: Find the conditional probability P(in favor | male) for the data on 100 employees Solution

Chapter 4: Marginal & Conditional Probabilities 32

Example: Find the conditional probability P(female|in favor) for the data on 100 employees Solution

I ffavor Against In A i t Total T t l

Females who are in favor

P(female | in favor) =

Male

15

45

60

Female

4

36

40

Total

19

81

100

Number of females who are in favor Total number of employees who are in favor =

4 = .2105 19

Total number of in favor

Chapter 4: Marginal & Conditional Probabilities 33

Example: Consider the experiment of tossing a fair die. Denote by A and B the following events: A={Observing A {Observing an even number}, number} B B={Observing {Observing a number of dots less than or equal to 3}. Find the probability of the event A, given the event B. S l ti Solution

Chapter 4: Mutually Exclusive Events 34

¾

Events that cannot occur together are called mutually exclusive events.

Example: Consider the following events for one roll of a die A: an even number is observed = {2,4,6} B an odd B: dd number b is i observed b d = {1,3,5} {1 3 5} C: a number less than 5 is observed = {1,2,3,4} ‐ A and B are mutually exclusive events but A and C are not. ‐ How about B and C? ‐ Simple events are mutually exclusive always.

Chapter 4: Independent vs. Dependent events 35

¾

Two events are said to be independent if the occurrence of one does not affect the probability of the other one.

¾

A and d B are said id to t be b independent i d d t events t if either ith P(A| B) = P(A) or P(B | A) = P(B)

Example: Refer to the information on 100 employees. Are events “female (F)” and “in favor (A)” independent? Solution:

Chapter 4: Independent vs. Dependent events 36

¾

What is the difference between mutually exclusive and independent events? ¾

It is common to get confused or not to tell the difference between  It i t t f d t t t ll th diff b t these two terminologies.

¾

When two events are mutually exclusive, they cannot both happen.  O e the e e t B ha o u ed e e t A a ot o u o that P(A|B) Once the event B has occurred, event A cannot occur, so that P(A|B)  = 0, or vice versa. The occurrence of event B certainly affects the  probability that event A can occur. Therefore,

¾

¾

Mutually exclusive events must be dependent Mutually exclusive events must be dependent.

¾

Independent events are never mutually exclusive.

But, dependent events may or may not be mutually exclusive

Chapter 4: Independent vs. Dependent events 37

Example: A sample of 420 people were asked if they smoke or not and whether they are graduate or not. The following two‐way gives their responses p classification table g College graduate Not a college graduate Smoker

35

80

Nonsmoker

130

175

If an person is selected at random from this sample, find the  p p , probability that this person is a ¾

¾College graduate (G). ¾Nonsmoker (NS). Nonsmoker (NS) ¾Smoker (S)

given the person is not a college graduate (NG).

¾College graduate (G) given the person is a nonsmoker (NS). ¾Are the events Smoker and college graduate independent? 

Why?

Chapter 4: Complementary Events 38

¾

Two mutually exclusive events that taken together include all the outcome for an experiment (sample space, S) are called complementary events.

¾

Consider the following Venn diagram:

The complement of event A, denoted by A and read as “A bar” or “A A complement,” is the event that includes B all the outcomes for an experiment that Venn diagram of two complementary evens are not in A ¾ Si Since ce two co complementary p e e ta y eve events, ts, take taken toget together, e , iinclude c ude aall the sample space S, the sum of probabilities of all outcomes is 1

A

P(A) + P(A) = 1 → P(A) = 1 ‐ P(A)

Chapter 4: Complementary Events 39

Example: In a lot of five machines, two are defective. If one of machines is randomly selected, what are the complementary events for this experiment and what are their probabilities? Solution:

Chapter 4: Intersection of  Events & Multiplication Rule 40

Intersection of events ¾ Let A and B be two events defined in a sample space. The intersection of A and B represents the collection of all outcomes that are common to both A and B is denoted by any of the followings A and B, A ∩ B, or AB Example: Let A = the event that a person owns a PC Let B = the event that a person owns a mobile

A

A and B

B

Intersection of events A and B

Chapter 4: Intersection of  Events & Multiplication Rule 41

Multiplication rule ¾ Sometimes we may need to find the probability of two events happening together. together ¾

The probability of the intersection of two events A and B is called their joint probability. It is written P(AB) or P(A ∩ B)

¾

It can be obtained by multiplying the marginal probability of one event with the conditional probability of the second one.

¾

Multiplication rule: The probability of the intersection of two events A and B is P(AB) = P(A ∩ B) = P(A)P(B|A) = P(B)P(A|B)

Chapter 4: Intersection of  Events & Multiplication Rule 42

Example: The following table gives the classification of all employees of a company by gender and college degree. College graduate (G)

Not a college graduate (N)

Total

Male (M)

7

20

27

Female (F)

4

9

13

Total

11

29

40

If one employee is selected at random, random what is the probability that the employee is a female and a college graduate? Solution

Chapter 4: Intersection of  Events & Multiplication Rule 43

Chapter 4: Intersection of  Events & Multiplication Rule 44

Example: A box contains 20 DVD, 4 of which are defective. If two DVDs are selected at random (without replacement), what is the probability that both are defective? Solution:

Chapter 4: Intersection of  Events & Multiplication Rule 45

¾

If events A and B are independent, their joint probability simplifies from P(A ∩ B) = P(A)P(B |A) TO

¾

P(A ∩ B) = P(A)P(B )

Sometimes S ti we know k th joint the j i t probability b bilit off two t events t A and B, in this case, the conditional probability of B given A or A given B is

P( A ∩ B) P( A B) = P( B)

P( A ∩ B) P( B A) = P( A)

given that P( A) ≠ 0 and P( B) ≠ 0

Chapter 4: Intersection of  Events & Multiplication Rule 46

Example: According to a survey, 60% of all homeowners owe money on home mortgages. 36% owe money on both home mortgages and car loans. loans Find the conditional probability that a homeowner selected at random owes money on a car loan given that he owes money on a home mortgage. S l ti Solution:

Chapter 4: Intersection of  Events & Multiplication Rule 47

Example: A computer company has two quality control inspectors, Mr. Smith and Mr. Robertson, who independently inspect each computer before it is shipped to a client. client The probability that Mr. Smith fails to detect a defective PC is .02 while it is .01 for Mr. Robertson. Find the probability that both inspectors will fail to detect a defective PC. PC Solution:

Chapter 4: Intersection of  Events & Multiplication Rule 48

Example: The probability that a patient is allergic to Penicillin is .2. Suppose this drug is administrated to three patients. Find a) The probability that all three of them are allergic to it b) At least one of them is not allergic S l ti Solution:

Chapter 4: Union of Events & Addition Rule 49

Union of events ¾ Let A and B be two events defined in a sample space S. The union of events A and B is the collection of all outcomes that belong either to A and B or to both A and B and is denoted by “ A or B” or “A ∪ B”

S A

B

Chapter 4: Union of Events & Addition Rule 50

Example: A company has 1000 employees. Of them, 400 are females and 740 are labor union members. Of the 400 females, 250 are union members. members Describe the union of events “female” female and “union member” Solution

Chapter 4: Union of Events & Addition Rule 51

Addition rule ¾ The probability of the union of two events A and B is P(A ∪ B) = P(A) + P(B) – P(A ∩ B) Example: A university president has proposed that all students must take a course in ethics as a requirement for graduation. Three hundred faculty members and students from this university were asked about their opinion on this issue and it shown in the following table. table Opinion Favor

Oppose

Neutral

Total

Fac lt Faculty

45

15

10

70

Student

90

110

30

230

Total

135

125

40

300

Find the probability that a person selected is a faculty member or in  favor.

Chapter 4: Union of Events & Addition Rule 52

Solution: Opinion Favor (A) Faculty (F) Student (S) Total

Oppose (B)

Neutral (C)

Total

Chapter 4: Union of Events & Addition Rule 53

Example: There are a total of 7225 thousand persons with multiple jobs in the US. Of them, 4115 thousand are male, 1742 thousand are single, single and 905 thousand are male and single. single What is the probability that a selected person is a male or single? S l ti Solution Single (A) Male (M) Female (F) Total

Married (B)

Total

Chapter 4: Union of Events & Addition Rule 54

¾

The probability of the union of two mutually exclusive events A and B is P(A ∪ B) = P(A) + P(B)

Example: p A university y p president has p proposed p that all students must take a course in ethics as a requirement for graduation. Three hundred faculty members and students from this university were asked about their opinion on this issue and it shown in the following table. Opinion Favor

Oppose

Neutral

Total

Faculty

45

15

10

70

Student

90

110

30

230

T t l Total

135

125

40

300

Find the probability that a person selected is in favor or is  neutral

Chapter 4: Union of Events & Addition Rule 55

Solution:

Chapter 4: Union of Events & Addition Rule 56

Example: Eighteen percent of the working lawyers in the United States are female. Two lawyers are selected at random and it is observed whether they are male or female. female a) Draw a tree diagram for this experiment b) Find the probability that at least one of the two lawyers is a female. female Solution:

Chapter 4: Bayes’ Theorem 57

Addition Law

P( A ∪ B ) = P( A) + P ( B ) − P ( A ∩ B ) Multiplication Law

P( A ∩ B) = P( B) P( A B) P( A ∩ B ) = P( A) P( B A) Conditional Probability y

P( A ∩ B) P( A B) = P( B)

P( A ∩ B) P( B A) = P( A)

Chapter 4: Bayes’ Theorem 58

Example: Manufacturing firm that receives shipment of parts from two different suppliers. Currently, 65 percent of the parts purchased by the company are from supplier 1 and the remaining 35 percent are from supplier 2. Historical Data suggest the quality rating of the two supplier are shown in the table: Good Parts

Bad Parts

Supplier 1

98

2

Supplier 1

95

5

a) Draw a tree diagram g for this experiment p with the probability of all outcomes b) Given the information the part is bad, What is the probability the part came from supplier 1?

Chapter 4: Bayes’ Theorem 59

Solution:

Chapter 4: Bayes’ Theorem 60

Bayes’ theorem (two-event case)

P( A1 ) P ( B A1 ) P( A1 B) = P( A1 ) P ( B A1 ) + P( A2 ) P ( B A2 ) P( A2 ) P( B A2 ) P( A2 B) = P( A1 ) P ( B A1 ) + P( A2 ) P( B A2 ) Bayes’ theorem

P ( Ai ) P ( B Ai ) P ( Ai B ) = P ( A1 ) P ( B A1 ) + P ( A2 ) P ( B A2 ) + ... + P ( An ) P ( B An )