Statistics

ST 361: Introduction to Statistics Introduction to Probability
Kimberly Weems ksweems@ncsu.edu 5260 SAS Hall
1

Outline
• Probability Trees • Probability Models
– Sample Spaces, Events, Venn Diagrams

• Axioms of Probability • Probability Rules (Laws)
– Addition Rule – Multiplication Rule

Statistics

Example: Southwest Energy
 A Southwest Energy Company pipeline has 3 safety shutoff valves in case the line starts to leak.  The valves are designed to operate independently of one another:
• 7% chance that valve 1 will fail • 10% chance that valve 2 will fail • 5% chance that valve 3 will fail

 If there is a leak in the line, find the following probabilities:
a. b. c. d. That all three valves operate correctly That all three valves fail That only one valve operates correctly That at least one valve operates correctly
Statistics

Statistics .Probability Tree Approach • A probability tree is a useful way to visualize this problem and to find the desired probability.

A: P(all three valves operate correctly) •P(all three valves work) •= .79515 Statistics .90*.93*.95 •= .

07*.00035 Statistics .10*.B: P(all three valves fail) •P(all three valves fail) •= .05 •= .

D: P(at least one valve operates correctly) •7 paths •P(at least one valve operates correctly •= 1 – P(no valves operate correctly) •= 1 .99965 •1 path Statistics ..00035 = .

the test result will be negative with probability . the test result will be positive with probability .Example: AIDS Testing • • • • V={person has HIV}. If a person does not have the virus.990 Statistics . CDC: P(V)=.006 +: test outcome is positive (test indicates HIV present) -: test outcome is negative clinical reliabilities for a new HIV test: 1. If a person has the virus.999 2.

Question 1 • What is the probability that a randomly selected person will test positive? Statistics .

Probability Tree •clinical reliability •clinical reliability Statistics .

Probability Tree •clinical reliability •Multiply •branch probs •clinical reliability Statistics .

00994 = .01593 Statistics .Question 1 Answer • What is the probability that a randomly selected person will test positive? • P(+) = .00599 + .

999. the test result will be positive with probability . if a person does not have the virus.Question 2 • If your test comes back positive.990). what is the probability that you have HIV? (Remember: we know that if a person has the virus. the test result will be negative with probability . Looks very reliable • Statistics .

00599+.376 Statistics .Question 2 Answer Answer two sequences of branches lead to positive test.00994) = . P(person has HIV given that test is positive) =.00599/(. only 1 sequence represented people who have HIV.

01593 • Question 2: two sequences of branches lead to positive test.376 Statistics . only 1 sequence represented people who have HIV.00599 + .Summary • Question 1: • P(+) = .00599+.00599/(.00994 = . P(person has HIV given that test is positive) =.00994) = .

If a person has the virus. Statistics . the test result will be positive with probability .Recap • We have a test with very high clinical reliabilities: 1.376 • In other words. 62. If a person does not have the virus. most positives will be false.990 • But we have extremely poor performance when the test is positive: P(person has HIV given that test is positive) =. the test result will be negative with probability .999 2.4% of the positives are false positives! Why? • When the characteristic the test is looking for is rare.

It is defined by its – sample space. and – probabilities associated with each event. – events within the sample space.Probability models • A probability model is a mathematical representation of a random phenomenon. Statistics .

• S is continuous if it contains an interval (either a finite or infinite width) of real numbers.Sample Space • Random experiments have unique outcomes. • S is discrete if it consists of a finite or countable infinite set of outcomes. The set of all possible outcome of a random experiment is called the sample space. Statistics . S.

• [S is discrete] Does the part thickness meet specifications? S = {yes. We have S = {x|10 < x < 11}. the positive real line. S = {low. discrete. finite width] It is known that the thickness is between 10 and 11 mm. Statistics 19 .Example: Sample Spaces • [S is continuous] Randomly select and measure the thickness of a part. S = R+ = {x|x > 0}. medium. Negative or zero thickness is not possible. discrete. no}. • [S is continuous. high}. • [S is discrete] It is known that the thickness has only three values.

countable infinite ] Parts are randomly selected until a non-conforming part is found. 2}. yyn. • [S is discrete. • [S is discrete] Number of conforming parts? S = {0. S = R+ x R+. Statistics 20 . • [S is discrete] Do the 2 parts conform to specifications? S = {yy. ny. S is discrete. 1. yn.Example: Sample Spaces (cont’d) • [S is continuous] Two parts are randomly selected & measured. S = {n. S is discrete. nn}. S is continuous. …}. yn. yyyn. S is countably infinite.

or Ec . • Event combinations are: – Union of 2 events = the event consisting of all outcomes that are contained in either of two events. – Intersection of 2 events = the event consisting of all outcomes that contained in both of two events. Statistics 21 . one or more outcomes of the sample space. E1 U E2.. E’ or not E. E1 ∩ E2. – Complement of an event = the set of outcomes that are not contained in the event.e. Called E1 or E2. Called E1 and E2. i.Events Are Sets of Outcomes • An event (E) is a subset of the sample space of a random experiment.

– Let E1 denote the event that at least one part does conform to specifications. ny. ny. – Let E5 = {yn. S = {yy. at least one part does not conform. E2 = {nn} – Let E3 = Ø.Example: Discrete Event Algebra • Recall the sample space from Example 2. ny} – Then E1’ = {nn} Statistics 22 . nn} concerning conformance to specifications. the null or empty set. nn}. – Then E1 U E5 = S – Then E1 ∩ E5 = {yn. ny} – Let E2 denote the event that no part conforms to specifications. yn. yn. the universal set. – Let E4 = S. E1 = {yy.

– Let E2 = {x|11 < x < 15} – Then E1 U E2 = {x|10 ≤ x < 15} – Then E1 ∩ E2 = {x|11 < x < 12} – Then E1’ = {x|x < 10 or x ≥ 12} – Then E1’ ∩ E2 = {x|12 ≥ x < 15} 9 10 11 12 13 14 15 16 23 Statistics . show on the real line below.Example: Continuous Event Algebra • Measurements of the thickness of a part are modeled with the sample space: S = R+. – Let E1 = {x|10 ≤ x < 12}.

Venn Diagrams Show Event Relationships •Events A & B contain their respective outcomes. Statistics Venn diagrams 24 . The shaded regions indicate the event relation of each diagram.

Venn Diagram of Mutually Exclusive Events • Events A & B are mutually exclusive because they share no common outcomes. A ∩ B = Ø • Mutually exclusive events Statistics 25 . • Symbolically. •The occurrence of one event precludes the occurrence of the other.

• Probability is a number in the [0. a probability of: – 1 indicates highly likely – 0 indicates highly unlikely Statistics 26 .15) – percent (15%) – fraction (3/20) • Generally speaking.1] interval.What is Probability? • Probability is the likelihood or chance that a particular outcome or event from a random experiment will occur. only finite sample spaces ideas apply. • May be expressed as a: – proportion (0. • Here.

because each outcome in the sample space is equally likely.2.…10.Probability Based on Equally-Likely Outcomes • Whenever a sample space consists of N possible outcomes that are equally likely. We throw the die.1. Unbiased means that no face is favored. thus each face has an equal chance of being shown. when throwing the die. the probability that the die shows face 10 is 1/10 or 0. • Example: Consider an unbiased die with 10 faces labeled 1. the probability of each outcome is 1/N. Statistics 27 .

the probability of an event E. • Further explanation is necessary to describe probability with respect to continuous sample spaces. denoted by P(E). Statistics 28 . • The discrete sample space may be: – A finite set of outcomes – A countably infinite set of outcomes.Probability of an Event • For a discrete sample space. equals the sum of the probabilities of the outcomes in E.

all equally likely . The probability of any event A is: P(A) = {count of outcomes in A} / {count of outcomes in S} = |A| / k. Statistics . then each individual outcome has probability 1/k.Equally likely outcomes (uniform model) • Equally likely outcomes (uniform model): • If a random phenomenon had k possible outcomes.

their probabilities are: 0. event C = {z} – P(A) = _______ – P(B) = _______ – P(C) = _______ – P(A’) = _____ and P(B’) = ____ and P(C’) = ______ – Since event A∩B = {x}.1. then P(A∩B) = _____ – Since event AUB = {w.x}.3.y.x.1.z}. 0. 0.5. 0.z}.x.y. event B = {x.Example: Probabilities of Events • A random experiment has a sample space {w. These outcomes are not equally-likely.y.z}. • Event A ={w. then P(A∩C ) = ________ Statistics 30 . then P(AUB) = ______ – Since event A∩C = {null}.

Axioms of Probability • Probability is a number that is assigned to each member of a collection of events from a random experiment that satisfies the following properties: 1. P(S) = 1 2. then P(E1) ≤ P(E2). For each two events E1 and E2 with E1∩E2 = Ø. P(E’) = 1 – P(E) – complement rule – If E1 is contained in E2. 0 ≤ P(E) ≤ 1. P(E1UE2) = P(E1) + P(E2) – addition rule • These imply that: – P(Ø) =0 . Statistics 31 . for any event E 3.

Statistics 32 . A’ • Probabilities of joint events can often be determined from the probabilities of the individual events that comprise it. specifically: – Unions of events. A U B – Intersections of events.Probability Rules • Joint events are generated by applying basic set operations to individual events. A ∩ B – Complements of events. And conversely.

507 .Birthday Problem • What is the smallest number of people you need in a group so that the probability of 2 or more people having the same birthday is greater than 1/2? • Answer: 23 No.891 .994 Statistics . of people 23 30 40 60 Probability .706 .

Birthday Problem • A={at least 2 people in the group have a common birthday} • A’ = {no one has common birthday} :P ( A')  364 363  365 365 3 people 23 people : 364 363 343 P ( A')     . 498 365 365 365 so P ( A )  1  P ( A ' )  1  . 502 Statistics . 498  .

Probability rules • Addition Rule for Mutually Exclusive Events: Recall that two events A and B are mutually exclusive (or disjoint) events if they have no outcomes from S in common • If A and B are mutually exclusive events. then P(A or B) = P(A) + P(B) Statistics .

Probability rules General Addition Rule: For any two events A and B P(A or B) = P(A) + P(B) – P(A and B) Statistics .

Two events. A and B are independent if the occurrence of one does not affect the probability that the other one will occur. • If A and B are independent then P(A and B) = P(A) P(B). The probability of falling on the street is NOT independent of whether it has snowed. Statistics .Probability rules • Multiplication Rule for independent events. These events are dependent. does not influence the outcome of a coin tossed with my right hand. Remark on independence: The fact that a coin tossed with my left hand comes up T rather than H.

E.6 . What is the probability of this event ? Let F  2. and the event of interest.4. We roll a die. The event A that the outcome is {3} is _______. What is the probability of F? Statistics . The sample space (set of all possible outcomes) S = ____ The simple events are:___________. is “obtaining an odd number”.3. • Example 2.Some examples • Example1: We roll a 6-sided die. That is E  1.5.