SS 2 Probability Sp10 Bb

download SS 2 Probability Sp10 Bb

of 32

Transcript of SS 2 Probability Sp10 Bb

  • 8/8/2019 SS 2 Probability Sp10 Bb

    1/32

    Probability

  • 8/8/2019 SS 2 Probability Sp10 Bb

    2/32

    Some definitions.

  • 8/8/2019 SS 2 Probability Sp10 Bb

    3/32

    Types of Data

    Elements of a data set are referred to as data points (= observations ).

    Note: the word data is plural (e.g. the data are confusing).

    Experiment: a process that generates data.

    Qualitative (= categorical ) data: attributes (e.g. gender, occupation).Levels for qualitative variables are attributes or categories .

    Quantitative data: numerical valuesLevels for quantitative variables are called variates .

    Nominal numbers represent arbitrary codes: 1 = ME, 2 = EE evaluated the same way as qualitative data

    Ordinal numbers convey ranking: class rankdifference in numbers is often not meaningful

    Interval allows addition and subtraction: temperature100 F is not twice as hot as 50 F.

    Ratio allows addition, subtraction, multiplication, division: weightmost statistical work is done with this type

  • 8/8/2019 SS 2 Probability Sp10 Bb

    4/32

    Sample Space

    Sample space, S: all possible outcomes of an experiment

    Example What is the sample space for the experiment of tossing adie and observing the number on the top face?{1,2,3,4,5,6}

    Example Using a rule, describe the sample space for even faces on adie?{x | x is even}

    Event: a subset of S

    The vertical bar | is read as such that

    www.wikipedia.org

  • 8/8/2019 SS 2 Probability Sp10 Bb

    5/32

    Multiplication Rule

  • 8/8/2019 SS 2 Probability Sp10 Bb

    6/32

    Multiplication Rule

    A way to count independent eventsApplicable when the probability of any one of them is unaffected by theoccurrence of the other.

    n1 x n 2 ... x n k

    Example What is the total number of possible outcomes from two tossesof a die?

    Example How many odd 4-digit numbers can be formed from the digits 1,2, 3, and 4 if each can be used multiple times ?

    6 x 6 = 36

    choice for units position = 2 (digits 1 or 3)choice for tens position = 4 (digits 1, 2, 3, or 4 )choice for hundreds position = 4choice for thousands position = 4

    4x4x4x2 = 128

  • 8/8/2019 SS 2 Probability Sp10 Bb

    7/32

    Multiplication Rule

    Example How many odd 4-digit numbers can be formed from the digits 1,2, 3, and 4 if each can be used only once ?

    choice for units position = 2 (digits 1 or 3)choice for tens position = 3 (digits 2, 4, and 1 or 3)

    choice for hundreds position = 2choice for thousands position = 12x3x2x1 = 12

  • 8/8/2019 SS 2 Probability Sp10 Bb

    8/32

    Probability of an Event

  • 8/8/2019 SS 2 Probability Sp10 Bb

    9/32

    Probability of an Event

    If a particular outcome must always occur at each trial, then there is aprobability of 1 of that outcome. Similarly, a probability of 0 is equivalent tocertainly will not occur. Probability values between 0 and 1 are reserved for uncertain outcomes.

    We can calculate probabilities of outcomes by building up from outcomeswhose probabilities we know.

    The two types of events we shall consider are either/or and both/and .

    Outcomes are mutually exclusive if only one can occur at any one trial.

    Outcomes are independent if the occurrence of either one of them in a

    composite trial does not affect the probability of the other occurring.

  • 8/8/2019 SS 2 Probability Sp10 Bb

    10/32

    Probability of an Event

    The probability of an event A, P(A), if n of N outcomes correspond to A is:

    P(A) = n/N , 0 < P(A) < 1, P(S) = 1

    ExampleHeads represents one event for the outcome of a coin toss, and heads andtails are the only two possible outcomes of a toss. Thus, P(H) = 1/2.

    A is the complement of A with respect to S: P(A)+P(A)=1

    Intersection of two events A and B (A B): event containing all elementscommon to A and B

    Union of two events A and B (A U B): event containing all elements thatbelong to A or B or both

    A and B are mutually exclusive if A B =

  • 8/8/2019 SS 2 Probability Sp10 Bb

    11/32

    Addition Rule

  • 8/8/2019 SS 2 Probability Sp10 Bb

    12/32

    S

    BA

    2

    Addition Law

    For outcomes of OR type, i.e. A U B (union)

    If outcomes A and B are not mutually exclusive , then the probability of theoccurrence in any trial of the event either A or B is equal to

    P(A U B) = P(A) + P(B) P(A B)

    If outcomes A and B are mutually exclusive , then the probability of theoccurrence in any trial of the event either A or B is equal to P(A) + P(B).

    S

    A Bexamples: probability of throwingeither 2 or 4 on a die is 1/6 + 1/6;probability of throwing either a heador a tail is + = 1

    example: probability of brown hair or brown eyes

    intersection

  • 8/8/2019 SS 2 Probability Sp10 Bb

    13/32

    S

    BA 2

    S

    B

    C

    A 22

    23

    Addition Law, Extension to 3 Cases

    If outcomes A, B, and C are not mutually exclusive , then the probability of

    the occurrence in any trial of the event either A or B or C is equal toP(A U B U C) = P(A) + P(B) + P(C)

    P(A B) P(A C)

    P(B

    C)+ P(A B C)

    light blueareacovered

    twice

    red areacovered

    thrice

    S

    B

    C

    A1

    S

    B

    C

    A2

    S

    B

    C

    A3

    green areasubtracted

    once toooften

  • 8/8/2019 SS 2 Probability Sp10 Bb

    14/32

    Probability of an Event

    If events A 1, A2, ... A n are mutually exclusive , thenP(A 1 U A2 U ... A n) = P(A 1) + P(A 2) + ... P(A n)

    Example What is the probability, when tossing a die, of getting aneven number?

    The total sample space is:{1,2,3,4,5,6} 6 points

    The probability of getting any one of these outcomes is the same, 1/6.Getting one face precludes getting any other, so the events are

    mutually exclusive.Three of the faces are even.

    The probability is therefore1/6 + 1/6 + 1/6 = 3/6 = 1/2

    This example is trivial, but the logic is important.

    special case of theaddition law

  • 8/8/2019 SS 2 Probability Sp10 Bb

    15/32

    Addition Law vs. Multiplication Law

    Addition Law

    For outcomes of OR type, i.e. A U B

    Multiplication Law

    For outcomes of AND type, i.e. A B

    S

    BA

    S

    BA

  • 8/8/2019 SS 2 Probability Sp10 Bb

    16/32

    Multiplication Law

    For outcomes of AND type, i.e. A B (intersection)

    If A and B can occur then:

    P(A B)= P(A)P(B|A), if P(A)>0

    = P(B)P(A|B), if P(B)>0

    Conditional probability:

    Probability event B occurring when event A has occurred: P(B|A)(probability of B, given A)

    P(B|A)= P(A B) / P(A)

    ExampleProbability that a regularly scheduled flight departs on time is 0.83, probabilitythat it arrives on time is 0.82, probability it departs and arrives on time is 0.78.Find the probability that a plane (a) arrives on time given that is departed ontime, (b) departed on time given it has arrived on time.

  • 8/8/2019 SS 2 Probability Sp10 Bb

    17/32

    Independence

  • 8/8/2019 SS 2 Probability Sp10 Bb

    18/32

    Independence

    Events are independent if and only if P(B|A) = P(B) or P(A|B) = P(A)

    OR

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

    This concept is critical, and will be used several times later in the course.

    Rearranging:

    P(A B) = P(A)P(B) = P(A)P(B|A)= P(B)P(A|B)

    Here the vertical bar | is read as given.

  • 8/8/2019 SS 2 Probability Sp10 Bb

    19/32

    More Complex Multiplication Rule Examples

  • 8/8/2019 SS 2 Probability Sp10 Bb

    20/32

    Multiplication Rules

    P(A

    B) = P(A)P(B|A)

    example 2.37 in Walpole:

    One of the balls from the blue bag is put into the pink one.What is P(black from 2 nd bag) = P(B 2)?

  • 8/8/2019 SS 2 Probability Sp10 Bb

    21/32

    Multiplication Rules

    P(W) = 4/7

    P(B) = 3/7

    P(W) = 4/9

    P(B) = 5/9

    P(W) = 3/9

    P(B) = 6/9

    P(W 2 W1) = 4/7 * 4/9= 0.254

    P(B 2 W1) = 4/7 * 5/9= 0.317

    P(W 2 B1) = 3/7 * 3/9= 0.143

    P(B 2 B1) = 3/7 * 6/9= 0.286

    P(B 2) = 0.317 + 0.286 = 0.603

    reality check: P(W 2) = 0.254 + 0.143 = 0.397

    Since these events aremutually exclusive, canuse the addition rule.

  • 8/8/2019 SS 2 Probability Sp10 Bb

    22/32

    Multiplication Rules

    Example

    One box contains 5 roses and 3 daffodilsA second box contains 3 daffodils and 6 carnationsA third box contains 4 roses and 1 daffodil.

    A flower is removed from the first box and placed unseen in the second.Then a flower is removed from the 2nd box and placed unseen in the third box.Finally, a flower is removed from the 3rd box.What is the probability that it is a rose?

    www.thedailygreen.org

    Rose?

  • 8/8/2019 SS 2 Probability Sp10 Bb

    23/32

    Multiplication Rules

    roses daffodils carnations totalBox 1 5R 3D 0C 8FBox 2 0R 3D 6C 9FBox 3 4R 1D 0C 5F

    5R 3D1

    1R 3D 6C2 4D 6C

    5/8R 3/8D

    3/10D 6/10C 4/10D 6/10C

    4R 2D 4R 1D 1C 4R 2D 4R 1D 1C5R 1D3

    R 1/10

    R 5/6 D 1/6 R 4/6 D 2/6 R 4/6 C 1/6 R 4/6 D 2/6 R 4/6 C 1/6D 1/6 D 1/6

    5/8 x 1/10 x 5/60.052 +

    5/8 x 3/10 x 4/60.125 +

    5/8 x 6/10 x 4/60.250 +

    3/8 x 4/10 x 4/60.100 +

    3/8 x 6/10 x 4/60.150 = 0.677

    (originally 0.66 from box 3)

  • 8/8/2019 SS 2 Probability Sp10 Bb

    24/32

    Some card problems

    What is the probability of getting, in a hand of 5 cards 1. an ace, a jack, a seven, a three, and a two, in that order?2. an ace, another ace, a jack, another jack, and a third jack, in that order?

    Probability of an Event: Counting n and N Outcomes

    The probability of an event A, P(A), if n of N outcomes corresponds to A is:P(A) = n/N

    www.wikipedia.org

  • 8/8/2019 SS 2 Probability Sp10 Bb

    25/32

    Example

    1. What is the probability of getting, in a hand of 5 cards, A, J, 7, 3, and 2, inthat order?

    The probability of getting an A with the first card is 4/52The probability of getting a J with the 2 nd card is 4/51The probability of getting a 7 with the 3 rd card is 4/50The probability of getting a 3 with the 4 th card is 4/49The probability of getting a 2 with the 5 th card is 4/48

    Each is independent, so (4) 5/52*51*50*49*48= 1024/311,875,200 = 3.3*10 -6

    Probability of an Event: Counting n and N Outcomes

    Note that any other order for these cards occurs with the same probability.

    Note that to get the probability of getting this hand with the cards in any order, add the probabilities for all the different possible orders (5!); add

    because the cases are mutually exclusive.

    b b l f d

  • 8/8/2019 SS 2 Probability Sp10 Bb

    26/32

    Example

    2. What is the probability of getting, in a hand of 5 cards, an ace, another ace, a jack, another jack, and a third jack, in that order?

    The probability of getting an ace with the first card is 4/52The probability of getting an ace with the 2 nd card is 3/51

    The probability of getting a jack with the 3 rd card is 4/50The probability of getting a jack with the 4 th card is 3/49The probability of getting a jack with the 5 th card is 2/48

    Each event is independent, so (4*3*4*3*2)/52*51*50*49*48= 288/ 311,875,200 = 3456 / 311,875,200= 9.2 * 10 -7

    Probability of getting the same type of card diminishes.

    Probability of an Event: Counting n and N Outcomes

    Conditional probability. Events are not independent.But we can treat them as independent by decrementing.

  • 8/8/2019 SS 2 Probability Sp10 Bb

    27/32

    An Application of these Rules: System Reliability

    S t R li bilit

  • 8/8/2019 SS 2 Probability Sp10 Bb

    28/32

    System Reliability

    An important application of probability is reliability analysis of systems.

    Reliability of a component i can be defined in terms of a survival probability :

    R i(t) = P(component i survives longer than time t)

    The system reliability is a function of the components:R s(t) = f{ R 1(t), R 2(t), R 3(t)}

    There are two basic system forms: parallel and series . We can illustrate themsimilarly to electrical circuits.

    (adapted from Lapin, Modern Engineering Statistics, Duxbury Press, 1997)

    www.wikipedia.org

    S t R li bilit

  • 8/8/2019 SS 2 Probability Sp10 Bb

    29/32

    System Reliability

    The system functions as long as ALL the components function.Failure of any component causes the system to fail.(Multiplication rule: 1 survives AND 2 survives AND 3 survives.)

    Example: If the toner cartridge of a photocopier is empty, the machine nolonger makes copies. If the paper jams at position C, the machine can nolonger make copies. If the lamp bulb blows, no copies.

    From the multiplication law for independent events:R s(t) = R 1(t) R 2(t) R 3(t)R n(t)

    (adapted from Lapin, Modern Engineering Statistics, Duxbury Press, 1997)

    1 2 3R1(t) = 0.90 R 2(t) = 0.80 R 3(t) = 0.95

    Components in Series

    R s(t) = 0.90*0.80*0.95 = 0.68

    failures areindependent(assumption)

    System Reliability

  • 8/8/2019 SS 2 Probability Sp10 Bb

    30/32

    System Reliability

    The system functions as long as ANY ONE the components function.The system fails only when all the components fail.

    Example: a photocopier has two printer trays, so the copier can still make

    copies when one is empty.

    We need to find the failure probabilities, rather than the reliability probabilities:

    Components in Parallel

    Rp(t) = 1 - 0.10*0.20*0.05 = 0.99

    1

    2

    3

    R1(t) = 0.90

    R2(t) = 0.80

    R3(t) = 0.95

    P(component failure) =1 P(component survival)

    P(system survival) =1 P( all components failure)

    Rp(t) =1 [1 - R 1(t)][1 - R 2(t)][1 -R n(t)]

    Increasing System Reliability

  • 8/8/2019 SS 2 Probability Sp10 Bb

    31/32

    1 2 3R1(t) = 0.90 R 2(t) = 0.80 R 3(t) = 0.95

    Original System

    Rs

    (t) = 0.68

    Increasing System Reliability

    1. Increase the reliability of individual components

    1 2 3R1(t) = 0.90 R 2(t) = 0.95 R 3(t) = 0.95

    Upgraded Component

    1 3R2(t) = 0.80

    2

    R1(t) = 0.90 R3(t) = 0.95

    Duplicated Component

    Rs (t) = 0.81

    Rs (t) = 0.82

    R2(t) = 0.80

    2

    Notice that if the first component is upgraded instead of the second, the reliabilitydoes not increase much: the least reliable component most strongly affects theoverall reliability in a series system.

    2. Increase redundancy byduplicating components

    1 2 3R1(t) = 0.99 R 2(t) = 0.80 R 3(t) = 0.95

    Upgraded Component

    Rs (t) = 0.75

  • 8/8/2019 SS 2 Probability Sp10 Bb

    32/32