Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Probability-1 A researcher claimed that there are 10% of the a large population have disease H. A quality control officer claimed that 10% of the products are defective. A random sample of 5 people is taken from this population and examined. A random sample of 5 products is taken from this population and examined. If 4 people in this random sample have the disease, what does it mean? How likely would this happen if the research is right? If 4 products in this random sample are defective, what does it mean? How likely would this happen if the quality control officer is right? Probability & Distribution - 1 Probability & Distribution - 2 Probability Terminology • • • Random Experiment: Experiment : an experiment whose outcomes depend on chance. Sample Space: Space: collection of all possible outcomes in random experiment. Event:: a collection of outcomes Event Probability & Distribution - 3 Definition of Probability What is probability? What’s the probability of getting a head on the toss of a single fair coin? Use a scale from 0 (no way) to 1 (sure thing). So toss a coin twice. Do it! Did you get one head & one tail? What’s it all mean? Probability & Distribution - 4 Empirical Probability Assignment A rough definition:(frequentist definition) Empirical probability assignment: Probability of event A is the proportion of times that the event A would occur in a very long series of repetitions of a random experiment. P(A) = Probability & Distribution - 5 Number of times event A occurred Number of times experiment is repeated Probability & Distribution - 6 Probability-2 Theorectial Probability Assignment Many Repetitions!* Total Heads / Number of Tosses 1.00 Theoretical probability assignment: Number of equally likely outcomes in event A 0.75 P(A) = Size of the sample space 0.50 0.25 0.00 0 25 50 75 100 Number of Tosses 125 Probability & Distribution - 7 Counting Technique • • • • Probability & Distribution - 8 Tree Diagram Tree diagram Multiplication principle Permutation rule Combination rule 1 2 4 3 H T Probability & Distribution - 9 Multiplication Principle Counting Rule: Multiplication Principle: In a sequence of k events in which the first one has n1 possibilities and the second event has n2 and the third has n3 , and so forth, the total possibilities of the sequence will be n1 × n2 × n 3 × … × n k Probability & Distribution - 10 Permutation Rule Permutation Rule: The number of possible permutations of r objects from a collection of n distinct objects is n Pr = n!/(n - r)! 2x4=8 possible outcomes Probability & Distribution - 11 1 2 3 4 1 2 3 4 Probability & Distribution - 12 Probability-3 Factorial n! = 1·2·3·... ·n Example: Permutations How many ways can a four-digit code be formed by selecting 4 distinct digits from nine digits, 1 through 9, without repeating use of the same digit? 3! = 1·2·3 = 6 9·8·7·6 = 9!/5! = 9!/(9-4)! (formula) Probability & Distribution - 13 Probability & Distribution - 14 Combination Rule Combination Rule: The number of possible combinations of r objects from a collection of n distinct objects is n Cr = n r = n!/[r!(n - r)!] Probability & Distribution - 15 Combinations Combinations How many ways can a combination of 4 distinct digits be selected from nine digits, 1 through 9? 9·8·7·6/4! = 9!/(4! · 5!) = 9!/[4! · (9-4)!] (formula) Probability & Distribution - 16 Venn Diagram How many ways can 6 distinct numbers be selected from a set of 47 distinct numbers? A B 47!/(6! ·41!) =10,737,573 Sample Space A∩B Probability & Distribution - 17 Probability & Distribution - 18 Probability-4 Relative Frequency and Probability Intersection of events: A ∩ B <=> A and B Union of events: A ∪ B <=> A or B Probability & Distribution - 19 Number of children per household from a sample of 300 households Class Frequency 0 1 2 3 4 5 Total 54 117 72 42 12 3 300 Relative Frequency .18 .39 .24 .14 .04 .01 1.00 Probability & Distribution - 20 Venn Diagram If a household is random selected from these 300 households, A = a household has less than 3 children. B = a household has between 2 to 4 children P(A) = .81, P(B) = .28 P(A and B) = P(2 children) = .24 Probability & Distribution - 21 General Addition Rule P(A or B) = P(A) + P(B) - P(A and B) = .81 + .28 - .24 = .85 A B Sample Space P(A ∪ B) = P(A) + P(B) - P(A ∩ B) Probability & Distribution - 22 Mutually Exclusive A and B are mutually exclusive (disjointed) events A P(A ∪ B) = P(A) + P(B) Probability & Distribution - 23 Probability & Distribution - 24 B Probability-5 Special Addition Rule In the 300 household example, if event B is select a household that has five children, then A and B are mutually exclusive. P(A) = .81, P(B) = 0.1 P(A or B) = P(A) + P(B) = .82 Complement of Event A’ is the complement of event A A’ A Sample Space P(A) = 1 - P(A’) Probability & Distribution - 25 Conditional Probability The conditional probability of A to occur given B has occurred is denoted as P(A|B) and is, if P(B) is not zero, P(A|B) = P(A and B) / P(B) or P(A|B) = n(A and B) / n(B) n(E) = # of equally likely outcomes in E. Probability & Distribution - 27 General Multiplication Rule General multiplication rule: P(A and B) = P(A|B) P(B) = P(B|A) P(A) Probability & Distribution - 29 Probability & Distribution - 26 Conditional Probability Cancer C Smoke S 20 (.2) Not Smoke S’ 5 P(C) = .25 (.05) No cancer C’ 30 (.3) 45 (.45) P(S) =.5 P(S’) = .5 P(C’) = .75 P(C|S) = .2/.5 = .4 P(C|S’) = .05/.5 = .1 Probability & Distribution - 28 Independent Events Events A and B are independent if P(A|B) = P(A) or P(A and B) = P(A) ·P(B) {=P(A|B) · P(B)} Probability & Distribution - 30 Probability-6 Independent Events Independent Events If events A1 , A2, …, Ak are independent, then Hi : the ith trial in tossing a coin turns up Head P(H1 and H2) = P(H1 ) P( H 2) (= .5 ·.5 = .25) P(A1 and A2 and … and Ak) = P(A 1) ·P(A2 ) · … ·P(A ·P(Ak) P(H1 and H2 and H3 ) = P(H1 ) P( H2) P( H3) What is probability of seeing 2 heads in tossing 3 coins experiment? Probability & Distribution - 31 Probability & Distribution - 32 Probability Distribution If a balanced coin is tossed, Head and Tail are equally likely to occur, P(Head) = .5 = 1/2 and P(Tail) = .5 = 1/2 P(all possible outcomes) = P(Head or Tail) = P(Head) + P(Tail) = 1/2 + 1/2 = 1.0 Total probability is 1. Probability & Distribution - 33 Probability Distribution If outcomes are equally likely to occur, the distribution is P(1) = 1/6, P(3) = 1/6, P(5) = 1/6, P(2) = 1/6, P(4) = 1/6, P(6) = 1/6, and total probability is 1. Probability & Distribution - 34 Uniform Distribution Properties of Probability • Probability is always a value between 0 and 1. Probability Density (Mass) Distribution 0.2 0.15 • Total probability equals 1. 0.1 0.05 0 0 Probability & Distribution - 35 1 2 3 4 5 Probability & Distribution - 36 Probability-7 Relative Frequency and Probability Discrete Distribution Number of children per household from a sample of 300 households Class Frequency 0 1 2 3 4 5 Total 54 117 72 42 12 3 300 Relative Frequency .18 .39 .24 .14 .04 .01 1.00 Probability & Distribution - 37 0.5 0.4 0.3 0.2 0.1 0 0 1 2 3 4 5 Probability & Distribution - 38 Discrete Distribution If a household is randomly selected from the 300 household, what is the probability that it has more than 3 children? P(more than 3 children) Relative Frequency Distribution = .04 + .01 = .05 Probability & Distribution - 39 Discrete Random Variable Random Variable A variable that assumes a numerical description for the outcome of a random experiment (by chance). Usually is denoted by a capital letter. X, Y, Z, ... Probability & Distribution - 40 Discrete Random Variable Example: (Toss a balanced coin) A random variable assumes discrete values. X = 1, if Head occurs, and X = 0 if Tail occurs. P(Head) = P(X=1) = P(1) = .5 P(Tail) = P(X=0) = P(0) = .5 Probability & Distribution - 41 Probability & Distribution - 42 Probability-8 Measure of Center for a Distribution Discrete Random Variable The mean value (expected value) of a discrete random variable (distribution) X, denoted by µX or just µ (or E[X]) is defined as Example: What is probability of getting a number less than 3 when roll a balanced die? P( X < 3 ) = P( X ≤ 2) = ? µX = Σx · p(x) Example : Toss a balanced coin and interested in number of heads turn up. { x=1 implies “head” and x=2 implies “not head”, and p(1) = .5, p(0) = .5.} Answer: 2/6 = 1/3 So, µX = 1 · p(1) + 0 ·p(0) = .5 + 0 = .5 Probability & Distribution - 43 Probability & Distribution - 44 Measure of Spread for a Distribution Why Random Variable? The variance of a discrete random variable (distribution) X, denoted by σX 2 or just σ2 (or V[X]) is defined as • σX 2 = Σ (x - µ)2 ·p(x) • Example : Toss a balanced coin and interested in number of heads turn up. { x=1 implies “head” and x=0 implies “not head”, and p(1) = .5, p(0) = .5.} A simple mathematical notation to describe an event. e.g.: X < 3, X = 0, ... Mathematical function can be used to model the distribution through the use of random variable. e.g.: Binomial, Poisson, Normal, … So, σX 2 = (1-.5) 2 ·p(1) + (0-.5)2 · p(0) = .125 + .125 = .25 Probability & Distribution - 45 Probability & Distribution - 46 Bernoulli Trial Bernoulli Probability Definition: Bernoulli trial is a random experiment whose outcomes are classified as one of the two categories. (S , F) or (Success, Failure) or (1, 0) Example: In a random experiment of tossing an unbalanced coin, the probability of Head is 0.3, what is the probability distribution? P(S) = P(X=1) = π , P(F) = P(X=0) = 1 - π . P(Head) = P(X=1) = 0.3, P(Tail) = P(X=0) = 1 - 0.3 = 0.7. Example: (Head, Tail), (Died, Survived) Probability & Distribution - 47 Probability & Distribution - 48 Probability-9 Bionomial Experiment A random experiment involving a sequence of independent and identical Bernoulli trials. Example: •Toss a coin ten times and observing Head or Tail turns up. Binomial Probability Model How to model the number successes, x, in a sequence of n independent and identical Bernoulli trials? •Roll a die 3 times and observing a 6 or not 6 turns up. Probability & Distribution - 49 Binomial Probability Model In a binomial experiment involving n independent and identical Bernoulli trials each with probability of success π , the probability of having x successes can be calculated with the binomial probability mass function, and it is, for x = 0, 1, …, n, n− x n x P ( X = x ) = ⋅ π ⋅ (1 − π ) x x n− x n! = ⋅ π ⋅ (1 − π ) Probability & Distribution - 51 x!⋅( n − x )! Probability & Distribution - 50 Parameters of Binomial Distribution Parameters of the distribution: Mean of the distribution, µ = n· π Variance of the distribution, σ2 = n· π ·(1- π) Standard deviation, σ , is the square root of variance. Probability & Distribution - 52 Binomial Probability Binomial Probabillity Example: A balanced die is rolled three times (or three balanced dice are rolled), what is the probability to see two 6’s? Example: If there are10% of the population in a community have a certain disease, what is the probability that 4 people in a random sample of 5 people from this community has the disease? (Parameters: µ = 3·(1/6) = 1/2, σ 2 = 3·(1/6)·(5/6) = 5/12) n = 3, π = 1/6, x = 2 Identify n = 5, x = 4, π = .10 P(X=2) = { 3! / [2!·1!] } ·(1/6)2·(5/6)3-2 = 3·(1/6)2·(5/6)1 = .069 P(X=4) = { 5! / [4!·(5-4)!] }·(.10)4·(1-.10)5-4 = 5·(.10) 4(.90)1 = .0004 Probability & Distribution - 53 Probability & Distribution - 54 Probability-10 Binomial Probabillity Poisson Distribution Example: In the previous problem, what is the probability that 4 or more people have the disease? The Poisson distribution is used to model discrete events that occur infrequently in time or space. Identify n = 5, x = 4, π = .15 P(X≥4) = P(X=4) + P(X=5) = .0004 + { 5! / [5!(5-5)!] }·(.10)5·(1-.10)5-5 = .0004 + .00001 = .00041 (What this number is telling us?) Probability & Distribution - 55 Model the number of successes in a given time period or in a given unit space. Probability & Distribution - 56 Poisson Distribution Let X represents the number of occurrences of some event of interest over a given interval from a Poisson process, and the λ is the mean and also the variance of the distribution, the probability of X assumes the value x is, for x = 0, 1, 2, …, P( X = x) = −λ e λ x! x Poisson Process • • • The probability that a single event occurs within an interval is proportional to the length of the interval. Within a single interval, an infinite number of occurrences is possible. The events occurs independently both within the same interval and between consecutive non-overlapping intervals. Can be used to approximate Binomial prob, with large n. Probability & Distribution - 57 Probability & Distribution - 58 Poisson Proability If on average there are 4 cars stop by the gas station A in a given 15-minute around noon, what is the probability of observing 2 cars at this station in a given 15-minute period around noon? (Assume the arrivals of cars follow a Poisson Process.) A (Simple) Random Sample of size n consists of n individuals from the population chosen in such a way that every set of n individuals has an equal chance to be the sample actually selected. λ = 4, x = 2 P(X=2) =(e -4·42)/2! = .1465 Probability & Distribution - 59 Probability & Distribution - 60