Random Variable Theoretical Probability Distribution Random Variable Discrete Probability Distributions A variable that assumes a numerical description for the outcome of a random eperiment (by chance). Usually is denoted by a capital letter. X, Y, Z,... Very useful for mathematically modeling the distribution of variables. 1 2 Continuous Random Variable : A random variable assumes discrete values by chance. Continuous Random Variable: A random variable that can take on any value within a specified interval by chance. 3 4 Eample: (Toss a balanced coin) X = 1, if Head occurs, and X = 0, if Tail occurs. Head) = X=1) = 1) =.5 Tail) = X=0) = 0) =.5 1/2 Probability mass function: X=) =.5, if = 0, 1, 0 1 and X=) = 0, elsewhere. Total probability is 1. 5 Discrete Probability Distribution If a balanced coin is tossed, Head and Tail are equally likely to occur, X=1) =.5 = 1/2 and X=0) =.5 = 1/2 all possible outcomes) = X=1 or 0) = X=1) + X=0) = 1/2 + 1/2 = 1.0 Total probability is 1. 6 Random Variable - 1
Eample: What is probability of getting a number less than 3 when roll a balanced die? Probability mass function: X=) =1/6, if =1,2,3,4,5,or 6, and X=) = 0 elsewhere. 1/6 1 2 3 4 5 6 X < 3 ) = X 2) = X = 1) + X = 2) = 1/6 + 1/6 = 2/6 7 Discrete Uniform Probability Distribution Probability Mass Function for Discrete Uniform Distribution: ) = c, c is a constant Balanced Coin: ) = 1/2, for = 0,1 Balanced Die: ) = 1/6, for = 1,2,3,4,5,6 8 Balanced Die: ) = 1/6, for = 1,2,3,4,5,6 X=3) = 1/6 X=5) = 1/6 Other Discrete Distributions Bernoulli Binomial Poisson Geometric 9 10 Bernoulli Trial Bernoulli Distribution Model (Bernoulli Probability Distribution) Definition: Bernoulli trial is a random eperiment whose outcomes are classified as one of the two categories. (S, F) or (Success, Failure) or (1, 0) Eample: Tossing a coin, observing Head or Tail Observing patient s status Died or Survived. 11 12 Random Variable - 2
Bernoulli Probability Distribution Eample: (Tossing a balanced coin) S) = X=1) = p =.5 F) = X=0) = 1 p =.5 Bernoulli Distribution Bernoulli Probability Distribution Eample: In a random eperiment of casting a balanced die, we are only interested in observing 6 turns up or not. It is a Bernoulli trail. 6) = X=1) = p = 1/6 6 ) = X=0) =1 1/6 = 5/6.5 0 1 13 Bernoulli Distribution 0 1 14 Binomial Eperiment Binomial Distribution Model (Binomial Probability Distribution) 15 A random eperiment involving a sequence of independent and identical Bernoulli trials. Eample: Toss a coin ten times, and observing Head turns up. Roll a die 3 times, and observing a 6 turns up or not. In a random sample of 5 from a large population, and observing subjects disease status. (Almost binomial) 16 Binomial Probability Model A model to find the probability of having number successes in a sequence of n independent and identical Bernoulli trials. 17 Binomial Probability Model In a binomial eperiment involving n independent and identical Bernoulli trials each with probability of success p, the probability of having successes can be calculated with the binomial probability mass function, and it is, for = 0, 1,, n, n! n X = ) = p (1!( n )! n = p (1 n 18 Random Variable - 3
Factorial n! = 1 2 3... n 0! = 1 Eample: 3! = 1 2 3 = 6 5 5! 5 4 3 2 1 Eample: = = = 10 2 (5 2)!2! 3 2 1 2 1 19 Binomial Probability Eample: A balanced die is rolled three times (or three balanced dice are rolled), what is the probability to see two 6 s? Identify n = 3, p = 1/6, = 2 (6, 6, 6 ) (6, 6, 6) (6, 6, 6 ) 3! X=2) = (1/6) 2 (5/6) 3-2 2! 1! = 3 (1/6) 2 (5/6) 1 =.069 n! n X = ) = p (1!( n )! 20 Binomial Probability Binomial Probability Eample: If there are 10% 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? (Assume binomial eperiment.) Identify n = 5, = 4, p =.10 5! X=4) = (.10) 4 (1.10) 5-4 4! 1! = 5 (.10) 4 (.90) 1 =.0004 n! n X = ) = p (1!( n )! 21 Eample: In the previous problem, what is the probability that 4 or more people have the disease? Identify n = 5, = 4, p =.10 X 4) = X=4) + X=5) 5! =.00045 + (.10) 5 (1.10) 5-5 5! 0! =.00045 +.00001 =.00046 (What is this number telling us?) 22 Parameters of Binomial Distribution Parameters of the distribution: Mean of the distribution, µ =n p Variance of the distribution, σ 2 = n p (1 Standard deviation, σ, is the square root of variance. Binomial Distribution n = 5, p =.10 µ = 5.10 =.5 σ 2 = 5.1 (1.1) =.45 0.590 0) =.5905 1) =.3281 2) =.0729 3) =.0081 4) =.0004 5) =.00001 23 0 1 2 3 4 5 24 Random Variable - 4
Discrete Probability Models Bernoulli : Two categories of outcomes. Binomial : Number of successes in a binomial eperiment. Poisson : Number of successes in a given time period or in a given unit space. 25 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 of the distribution, then the probability of observing occurrences is, for = 0, 1, 2,, λ X = ) = e λ! It can be used to approimate Binomial prob., for large n. e = 2.71828 26 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 occur independently both within the same interval and between consecutive non-overlapping intervals. Eamples of Poisson Process Number of people visiting to the emergency room for treatment per hour. Number of customers coming to the Arby s to buy sandwich per ten minutes. 27 28 Poisson Probability If on average there are 4 people catch flu in a given week in a community during a certain season, what is the probability of observing 2 people catch flu in this community in a given week period during the season? (Assume the number of people catching flu in a given period of time follow a Poisson Process.) Poisson Probability If on average there are 4 people catch flu in a given week in a community during a certain season, what is the probability of observing 2 people catch flu in this community in a given two weeks period during the season? (Assume the number of people catching flu in a given period of time follow a Poisson Process.) λ = 4 = 2 e 4 4 2 X=2) = =.1465 X = ) = e λ λ! λ = 42 = 8 = 2 e 8 8 2 X=2) = =.011 X = ) = e λ λ! 2! 2! 29 30 Random Variable - 5
Poisson Probability If on average there are 4 people catch flu in a given week in a community during a certain season, what is the probability of observing less than 2 people catch flu in this community in a given week period during the season? (Assume the number of people catching flu in a given period of time follow a Poisson Process.) λ = 4 = 0 and 1 X<2) = X=0) + X=1) Discrete Probability Models Binomial : Number of successes in a binomial eperiment. (There is a sample taken.) Poisson : Number of successes in a given time period or in a given unit space. (No sample taken.) = (e -4 40 )/0! + (e -4 41 )/1! =.0916 31 32 Random Variable - 6