Presentation is loading. Please wait.

Presentation is loading. Please wait.

Probability and combinatorics Notes from www.math.uah.edu/stat/www.math.uah.edu/stat/ Virtual Laboratories in Probability and Statistics.

Similar presentations


Presentation on theme: "Probability and combinatorics Notes from www.math.uah.edu/stat/www.math.uah.edu/stat/ Virtual Laboratories in Probability and Statistics."— Presentation transcript:

1

2 Probability and combinatorics Notes from www.math.uah.edu/stat/www.math.uah.edu/stat/ Virtual Laboratories in Probability and Statistics

3 Discrete probability distributions List of mutually exclusive and exhaustive outcomes of some process and their probabilities Example - 1 coin toss Outcome:HeadTail Probability:1/2 Example - 1 fair die throw #spots:123456 Probability:1/6 This is an example of a discrete uniform distribution

4 Uniform distribution and counting Atoms12... N Probability:1/N P(A) = N(A)/N e.g. A = get less than 3 when you roll a dice P(A) = P(1) + P(2) = 2/6 So calculation of probabilities  counting But counting can be complicated. Need rules

5 Multiplication rule for ordered events Flying from LA to NY and back How many airline combinations are possible? E.g. (American, United), (United, American), (United, United) These are called ordered pairs Rule: If the first element of the pair can happen in n 1 ways and for each of these ways, the second element can happen n 2 ways, then the total no. of possibilities is n 1 n 2

6 Probabilities using product rule A license number consists of two letters (uppercase) followed by five digits. 1.How many different license numbers are there? 2.If a license number is chosen at random, find the probability that the digits are all less than 5. Total license nos. = 26*26*10 5 Valid license nos.=26*26*4 5 P(all digits < 5) = Valid license nos./Total license nos. = (4/10) 5 = 0.01024

7 Obstetricians and paediatricians Family needs to choose from 2 clinics: Clinic 1 has 2 obs and 2 paed Clinic 1 has 2 obs and 3 paed How many combos are possible? Unequal nos. of possibilities

8 Tree diagrams Total ways = 2+2+3+3 O1O1 O2O2 O3O3 O4O4 P1P1 P2P2 P1P1 P1P1 P3P3 P4P4 P5P5 P3P3 P4P4 P5P5

9 Permutations Sample space S with n elements Want to choose an ordered sequence of k No of ways possible= nPk nPk= n(n-1)(n-2)…(n-k+1) In statistics this is called sampling without replacement A special form of pigeonhole principle

10 Arrangement problem Twelve books, consisting of 5 math books, 4 science books and 3 history books are randomly arranged on a bookshelf. 1.How many outcomes are there? 2.Find the probability that the books of each type are together. 3.Find the probability that the math books are together.

11 Combinations Consider a sample space S with n elements. A combination of size k from S is an (unordered) subset {x 1, x 2,..., x k } of S with k (distinct) elements C(n,k) = nPk/k! This is also sampling without replacement, but order is ignored

12 Games of chance A poker hand consists of 5 cards dealt without replacement and without regard to order from a deck of 52 cards. 1.Show that the number of poker hands is 2,598,960. 2.Find the probability that a random poker hand is a full house (3 cards of one kind and 2 of another kind) 3.Find the probability that a random poker hand has 4 of a kind. 0.001440576 0.000240096

13 Independence Events X and Y are said to be independent if the probability that X occurs is not affected by whether or not Y has occurred. Examples of independent events: It can be shown that independence implies: P(X and Y) = P(X)P(Y) (and not otherwise) This is called the multiplication rule for independent events.

14 Example: 2 security guards Guard 1: answers pager 80% of the time Guard 2: answers pager 50% of the time What is the probability i) they both respond to a call? ii) at least one responds to a call? X= event guard 1 answers; Y= guard 2 answers What can we say about X and Y?

15 Tree models to calculate probabilities

16 DISCRETE DISTRIBUTIONS Example - Family of 3 children. Let X = number of girls Possible values: X = 3 GGG X = 2 GGB GBG BGG X = 1 BBG BGB GBB X = 0 BBB Assume the 8 outcomes are equally likely so that x 0 1 2 3 P(X = x)1/83/8 3/81/8 P(X  x)

17 Probability Distribution of a Discrete r.v. The probabilities may be written as: P(X i =x i ) is also referred to as the density function f(x) The cumulative distribution function (c.d.f.) is defined as

18 Example - Bernoulli trials Each trial is an 'experiment' with exactly 2 possible outcomes, "success" and "failure" with probabilities p and 1-p. Let X = 1 if success, 0 if failure Probability distribution is x 0 1 P(X = x)p 1-p Results for Bernoulli trials can be simulated using S-PLUS e.g. simulate results of a drug trial drug, success (cure) has probability p = 0.3 for each patient, 100 patients in trial. result _ rbinom(100, size=1, prob=p) result is a 100 vector that looks like 1,0,0,1,0,1,…...

19 Example-Binomial Experiment Generalisation of Bernoulli trials X ~ Bin(n,p)  X = # of successes in n Bernoulli trials e.g. X = # of heads in 10 tosses of a coin, n =, p = e.g. X = # of boys in a family of 5 children, n=, p = e.g. X = # of sixes in 100 rolls of a dice, n=, p= possible values for X = probability distribution for X (q = 1-p) P(X = k) =

20 Shape of the Binomial Distribution The shape of the binomial distribution depends on the values of n and p. probdistr_ dbinom(x=0:n, size=n, prob=p)

21 Example - 2 dice are thrown Let X denote the sum of the results. Outcomes: 112131415161 122232425262 132333435363 142434445464 152535455565 162636465666 Assume the 36 outcomes are equally likely so each has probability = 1/36 Possible values of X are 2, 3,..., 12 e.g. P(X = 4) = P(1,3 or 2,2 or 3,1) = 3/36. The probability distribution is x 234...101112 P(X=x)1/362/363/36...3/362/361/36


Download ppt "Probability and combinatorics Notes from www.math.uah.edu/stat/www.math.uah.edu/stat/ Virtual Laboratories in Probability and Statistics."

Similar presentations


Ads by Google