w3 probability

Upload: danny-manno

Post on 06-Apr-2018

229 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/2/2019 W3 Probability

    1/55

    Centre for Computer Technology

    ICT114Mathematics for

    Computing

    Week3

    Probability

  • 8/2/2019 W3 Probability

    2/55

    March 20, 2012

    Objectives

    Review of Week2

    Experiments

    Multiplication Rule Permutations

    Combinations

    Probability

    Conditional Probability

  • 8/2/2019 W3 Probability

    3/55

    March 20, 2012

    Measures of Central Tendency

    x1+x2+x3+.....+xn

    Mean, = ------------------------

    n

    Median is the middlemost number

    Mode of a data set is the value that occursmost often

  • 8/2/2019 W3 Probability

    4/55

    March 20, 2012

    Measures of Dispersion

    Variance,

    (x1- )2 + (x2- )2 + .....+ (xn- )22 = -------------------------------------------

    n

    Standard Deviation = (positive square root)

  • 8/2/2019 W3 Probability

    5/55

    March 20, 2012

    Weighted Mean

    For a given set of data, X= { x1, x2, ..., xn}

    and corresponding non-negative weights,

    W= { w1, w2, ..., wn}the weighted mean/average, is given by

    w1x1+w2x2+w3x3+.....+wnxn

    X = ---------------------------------------w1+w2+w3++wn

  • 8/2/2019 W3 Probability

    6/55

    March 20, 2012

    Mean and Variance from

    Frequency TableInterval mid point (x) frequency (f) f.X f.X2

    a0- a1 x1 f1 f1.x1 f1.x1.x1

    a1- a2 x2 f2 f2.x2 f2.x2.x2

    an-1an xn fn fn.xn fn.xn.xn

    All Total f Total f.x Total f.x.x

    Mean = total (f.x) / total f

    Variance = total (f.x.x)/total f (mean)2

  • 8/2/2019 W3 Probability

    7/55

    Centre for Computer Technology

    Probability

  • 8/2/2019 W3 Probability

    8/55

    March 20, 2012

    Experiments

    Experiment is a term used to describe anyprocess that generates a data set.

    Experiments when performed under verynearly identical conditions, give resultsthat are identical.

    In other words, the variables that affect theoutcome of the result are controlled.

  • 8/2/2019 W3 Probability

    9/55

    March 20, 2012

    Random Experiments

    In some experiments we cannot controlcertain variables that affect the outcome,

    even though most of the conditions are thesame.

    Such experiments are called random

    experiments. In most cases the outcome is affected by

    chance.

  • 8/2/2019 W3 Probability

    10/55

    March 20, 2012

    Random Experiments

    In a random experiment, we obtain anentire set of possible outcomes.

    Example: Tossing a die.

    The result of the experiment is that it will

    come up with one of the numbers thatbelongs to the set {1, 2, 3, 4, 5, 6}

  • 8/2/2019 W3 Probability

    11/55

    March 20, 2012

    Sample Space

    The set of all possible outcomes of astatistical experiment is called Sample

    Space. It is generally denoted by the symbol, S,

    which corresponds to the universal set.

    Each element in a sample space is calledan element or a member or a samplepoint.

  • 8/2/2019 W3 Probability

    12/55

    March 20, 2012

    Sample Space

    Frequently there are more than onesample space possible.

    Generally, there is one set that providesthe most information.

    Example: Tossing a die

    Possible outcomes are

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

    {even, odd}

  • 8/2/2019 W3 Probability

    13/55

    March 20, 2012

    Sample Space

    If the sample space has a finite number ofelements, it is called a finite sample space

    or a discrete sample space.

    If the sample space has a non countable

    number of elements, it is called an infinitesample space or a nondiscrete samplespace.

  • 8/2/2019 W3 Probability

    14/55

    March 20, 2012

    Sample Space

    Example:

    Sample space resulting from the tossing ofa coin, yields a discrete sample space.

    Picking any number, not just integers, from1 to 10 yields a nondiscrete sample space.

  • 8/2/2019 W3 Probability

    15/55

    March 20, 2012

    Sample Space

    One form to representa sample space is bythe use of a tree

    diagram.Example:Consider theselection of two itemsat random from aproduction line. Eachitem is classifieddefective (D) or nondefective (N).

  • 8/2/2019 W3 Probability

    16/55

    March 20, 2012

    Event

    An event is a subset of the samplespace S, generally denoted by A.

    In other words it is a set of possibleoutcomes for the experiment.

    If the outcome is an element of A,

    then the event A has occurred.

  • 8/2/2019 W3 Probability

    17/55

    March 20, 2012

    Event

    An event which consists of a single pointof S is called a simple or elementary

    event. S itself is called the sure or certain event,

    since an element of S must occur.

    The empty set (null) is called theimpossible element because an element of cannot occur.

  • 8/2/2019 W3 Probability

    18/55

    March 20, 2012

    Event

    Let A and B represent two events in S.

    1. A U Bis the event either A or B or both.

    2. A Bis the event both A and B3. A Bis the event A but not B.

    4. A/is the event not A.

    5. If A and B are disjoint, i.e., A B = ,then the events are mutually exclusive

  • 8/2/2019 W3 Probability

    19/55

    March 20, 2012

    Counting Sample Points

    In statistics, there is a need to evaluate thechance linked with the occurrence of

    certain elements during an experiment. Sometimes all the sample points are

    counted without actually listing them.

    The basic principle of counting is calledthe multiplication rule.

  • 8/2/2019 W3 Probability

    20/55

    March 20, 2012

    Multiplication Rule

    If an operation can be performed in n1ways, and if for each of these a secondoperation can be performed in n2 ways,

    then the two operations can be performedtogether in n1.n2 ways.

    Example: Number of sample points whena pair of dice is thrown is (6).(6) = 36ways.

  • 8/2/2019 W3 Probability

    21/55

    March 20, 2012

    In the previous example,

    The first dice can land in n1=6 ways

    The second dice can also land in n2

    =6 ways

    Using the Multiplication rule,

    The pair of dice can land inn1.n2= (6).(6) = 36 ways

  • 8/2/2019 W3 Probability

    22/55

    March 20, 2012

    Example: A developer of a new subdivision

    offers prospective home buyers a choice ofTudor, rustic, colonial, and traditional

    exterior styling in ranch, two-storey, and

    split-level floor plans. In how many differentways can a buyer order one of these

    homes?

    The buyer has to choose fromn1=4 and n2=3 homes.

    n1n2=(4).(3)=12 possible homes

  • 8/2/2019 W3 Probability

    23/55

    March 20, 2012

    Generalized Multiplication Rule

    If an operation can be performed in n1ways, and if for each of these a second

    operation can be performed in n2 ways,and for each of the first two a thirdoperation can be performed in n3 ways,and so forth, then the sequence of k

    operations can be performed inn1.n2.n3nk ways.

  • 8/2/2019 W3 Probability

    24/55

    March 20, 2012

    Permutations

    When dealing with a group of objects,there are a number of possible

    arrangements. For example, a number of different

    arrangements possible when a group ofsix people are sitting around a table.

    A permutation is an arrangement of all orpart of a set of objects.

  • 8/2/2019 W3 Probability

    25/55

    March 20, 2012

    Permutations

    Example: What are the differentarrangements possible with the alphabets

    a, b, c taking all of them at a time.

    The possible permutations are

    abc, acb, bca, bac, cab, cba

  • 8/2/2019 W3 Probability

    26/55

    March 20, 2012

    There are n1=3 choices for the first

    position, n2=2 choices for the secondposition and n3=1 choice for the lastposition.

    The total permutations/arrangements aren1. n2. n3 = 3.2.1 = 6

    n distinct objects can be arranged in

    n.(n-1).(n-2)1 ways

  • 8/2/2019 W3 Probability

    27/55

    March 20, 2012

    Permutations

    n distinct objects can be arranged in

    n.(n-1).(n-2)1 ways

    (the number of permutations for n distinct objects)The product is represented by n!read as n factorial.

    By definition 0! = 1! = 1

  • 8/2/2019 W3 Probability

    28/55

    March 20, 2012

    Permutations

    The number of permutations for n distinctobjects taken r at a time

    n.(n-1).(n-2)(n-r+1)

    The above product is represented by

    npr = n! / (n-r)!

  • 8/2/2019 W3 Probability

    29/55

    March 20, 2012

    Example: Three awards (research, teaching,

    service) will be given one year for a class of 25graduate students in a statistics department. Ifeach student can receive at most one award,how many possible selections are there?

    Since the awards are distinguishable, the totalpossible selections are

    25p3 = 25! / (25-3)! = 25!/22! = 25.24.23

    = 13800

  • 8/2/2019 W3 Probability

    30/55

    March 20, 2012

    Lets do this together

    A president and a treasurer are to bechosen from a student club consisting of50 people. How many different choices of

    officers are possible ifa. there are no restrictions

    b. A will serve only if he is president

    c. B and C will serve together or not at alld. D and E will not serve together

  • 8/2/2019 W3 Probability

    31/55

    March 20, 2012

    Some more concepts

    The number of permutations of n distinct objectsarranged in a circle is (n-1)!

    The number of distinct permutations of n thingsof which n1 are of one kind, n2 of a secondkind,.nk of a k

    th kind is

    n!

    -------------------

    (n1!)(n2!)(nk!)

  • 8/2/2019 W3 Probability

    32/55

    March 20, 2012

    Some more concepts

    The number of arrangements of a set of nobjects into r cells with n1 elements in thefirst cell, n2 elements in the second, and

    so forth, isn!

    -----------------------

    (n1!)(n2!)..(nr!)n1+n2++nr = n

  • 8/2/2019 W3 Probability

    33/55

    March 20, 2012

    Combinations

    A combination is a way of selecting robjects from n without regard to

    order. It is a partition with two cells.

    One cell contains ther objectsselected and the other cell containing

    the (n-r) objects that are left.

  • 8/2/2019 W3 Probability

    34/55

    March 20, 2012

    Combinations

    The number of combinations of n distinctobjects taken r at a time is

    n!ncr = --------------

    r! (n-r)!

  • 8/2/2019 W3 Probability

    35/55

    March 20, 2012

    Example

    Example:

    A young boy asks his mother to get fivegame-boy cartridges from his collection of10 arcade and 5 sports games. How manyways are there that his mother will get 3arcade and 2 sports games, respectively?

  • 8/2/2019 W3 Probability

    36/55

    March 20, 2012

    Example (contd)

    The number of ways of selecting 3 cartridgesfrom 10 is 10c3= 120.

    The number of ways of selecting 2 cartridgesfrom 5 is 5c2 = 10

    Using the multiplication rule with n1=120 and n2= 10, there are

    (120).(10) = 1200 ways

  • 8/2/2019 W3 Probability

    37/55

    March 20, 2012

    Concept of Probability

    In a random experiment, there isuncertainty if a particular event will or willnot occur.

    As a measure of chance or probability, avalue between 0 and 1 is assigned.

    If an event certainly occurs, the probabilityof the event happening is 100% or 1.Similarly for other degrees of uncertainty.

  • 8/2/2019 W3 Probability

    38/55

    March 20, 2012

    Two important procedures

    Classical ApproachIf an event can occur in h different ways

    out of a total of n possible ways, all ofwhich are equally likely, then theprobability of that event occurring is h/n.

  • 8/2/2019 W3 Probability

    39/55

    March 20, 2012

    Two important procedures

    Frequency ApproachIf after n repetitions of an experiment,

    where n is very large, an event isobserved to occur in h of these, then theprobability of the event is h/n. This is also

    called the empirical probability of theevent.

  • 8/2/2019 W3 Probability

    40/55

    March 20, 2012

    Axiomatic approach

    Let S be a sample space

    Let C be a class of events and A be one of

    them To each event A in C, a real number P(A)

    is associated.

    P is called the probability function andP(A) the probability of the element.

  • 8/2/2019 W3 Probability

    41/55

    March 20, 2012

    Axioms of Probability

    Axiom1: For every event A in class C

    P(A) 0

    Axiom2: For the sure or certain event S inthe class C, P(S) = 1

    Axiom3: For any number of mutually exclusive events A1,A2, in the class C

    P(A1UA2) = P(A1)+P(A2)+.

  • 8/2/2019 W3 Probability

    42/55

    March 20, 2012

    Some Important Theorems

    If A1A2, then

    P(A1) P(A2)

    P(A2-A1)=P(A1)-P(A2) For every event A,

    0 P(A) 1

    For , the empty set,

    P() = 0

  • 8/2/2019 W3 Probability

    43/55

    March 20, 2012

    Some Important Theorems

    If A is the complement of A, then

    P(A) = 1 P(A)

    If A = A1 U A2 UU An, where A1,A2,An are mutually exclusive events,

    then, P(A) = P(A1)+P(A2)++P(An)

    If A and A are complementary events,then, P(A)+P(A) = 1

  • 8/2/2019 W3 Probability

    44/55

    March 20, 2012

    Example: A coin is tossed twice. What is

    the probability that at least one headoccurs?

    The sample space for this experiment is

    S = {HH, HT, TH, TT}

    The number of times atleast one headoccurs is 3.

    Therefore the probability that atleast onehead occurs is P(A) = .

  • 8/2/2019 W3 Probability

    45/55

    Lets do this together

    Draw one card from an ordinary deck ofcards.

    a) What is the probability that it is theQueen of Hearts?

    b) What is the probability that it is either

    the King or the Queen of Hearts?c) What is the probability of getting boththe King and Queen of Hearts?

    March 20, 2012

  • 8/2/2019 W3 Probability

    46/55

    March 20, 2012

    Lets do this together

    A die is loaded in such a way that an evennumber is twice as likely to occur as anodd number. If E is the event that anumber less than 4 occurs on a singlethrow of the die, find P(E).

    Hint : P(S) = P(A1)+P(A2)+.+P(An) = 1

  • 8/2/2019 W3 Probability

    47/55

    March 20, 2012

    Addition Theorem of Probability

    If A and B are any two events, then

    P(AUB)=P(A)+P(B)-P(A B)

  • 8/2/2019 W3 Probability

    48/55

    March 20, 2012

    Lets do this together

    John is a graduate who has beeninterviewed by two companies A and B.He assesses that his probability of gettingan offer from A is 0.8, probability of gettingan offer from B is 0.6. He also believesthat his chance of getting an offer from

    both A and B is 0.5. What is the probabilityof he getting an offer from atleast one ofthese companies?

  • 8/2/2019 W3 Probability

    49/55

    March 20, 2012

    Conditional Probability

    The probability of an event B occurring, when anevent A has already occurred is calledconditional probability, represented by P(B/A).

    The conditional probability of B, given A,denoted by P(B/A), is defined by

    P(A B)

    P(B/A) = ---------------- if P(A)>0P(A)

  • 8/2/2019 W3 Probability

    50/55

    March 20, 2012

    Multiplication Theorem

    If in an experiment the events A and B canboth occur, then

    P(AB) = P(BA)

    = P(B/A).P(A)

    = P(A/B).P(B)

  • 8/2/2019 W3 Probability

    51/55

    March 20, 2012

    Example: The probability that a regularly

    scheduled flight departs on time isP(D)=0.83, the probability that that itarrives on time is P(A)=0.82, and the

    probability that it departs and arrives ontime is P(DA)=0.78. Find the probability

    that a plane (a) arrives on time given that

    it departed on time, and (b) departed ontime given that it has arrived on time.

  • 8/2/2019 W3 Probability

    52/55

    March 20, 2012

    (a) The probability that a plane arrives on

    time given that it departed on time isP(A/D) = P(DA)/P(D) = 0.94

    (b) The probability that a plane departedon time given that it has arrived on time is

    P(D/A) = P(DA)/P(A) = 0.95

  • 8/2/2019 W3 Probability

    53/55

    March 20, 2012

    Lets do this together

    Suppose we have a fuse box containing20 fuses, of which 5 are defective. If twofuses are selected at random andremoved from the box in successionwithout replacing the first, what is theprobability that both fuses are defective?

  • 8/2/2019 W3 Probability

    54/55

    March 20, 2012

    Summary

    Permutations, npr =n! / { (n-r)! }

    Combinations, ncr = n! / { r! (n-r)! }

    If an event occurs in h different ways out of a

    total of n possible ways, then the probabilityis h/n.

    Addition Theorem,

    P(AUB) = P(A) + P(B) - P(A B) Conditional Probability,

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

  • 8/2/2019 W3 Probability

    55/55

    March 20 2012

    References

    Spiegel, Schiller, Srinivasan : Probabilityand Statistics

    M R Spiegel : Theory and Problems ofStatistics, Schaum's Outline Series,McGraw Hill

    http://mathworld.wolfram.com