STAT 6201 - Mathematical Statistics Chapter 3 : Random variables 5, Event, Prc )
Random variables and distributions Let S be the sample space associated with a probability experiment Assume that we have defined the events of interest and a probability assignment for each event A random variable is a real-valued function that is defined on the sample space S Examples: I X = number of H in 10 tosses is a random variable; I Y = 10 X = number of T in 10 tosses is a random variable; I T = the temperature in this room; I Z = the price of Apple, Inc stock tomorrow; I etc The value of a random variable is not known before performing the probability experiment!
Range of values for a random variable I While we don t know the value of a random variable ahead of time (before performing the experiment), we can (in most cases) list the possible range of values for a random variable Examples : I X = number of H in 10 tosses is a random variable: X 2 {0, 1, 2,,10} I Y = 10 X = number of T in 10 tosses is a random variable Y 2 {0, 1, 2,,10} I N = number of coin flips until H is observed: N 2 {1, 2, 3,} I T = the temperature in this room; T 2 [200, 900] I Z = the price of Apple, Inc stock tomorrow Z 2 [00, 1)
Discrete vs conitnuous random variables I A random variable X is called a discrete if X can take only a finite or countable set of values X 2 {x 1, x 2,,x n } or X 2 {x 1, x 2, x 3,} I A random variable X is called continuous if it takes values in a subinterval of the real line, or the entire real line X 2 [a, b] or X 2 (a, 1) or X 2 R XE (, a) XE too, a ]
Examples Classify the following variables as discrete or continuous: I X = number of H in 10 tosses is a random variable: X 2 {0, 1, 2,,10} discrete I Y = 10 X = number of T in 10 tosses is a random variable Y 2 {0, 1, 2,,10} discrete I N = number of coin flips until H is observed: N 2 {1, 2, 3,} discrete I T = the temperature in this room; T 2 [200, 900] I Z = the price of Apple, Inc stock tomorrow Z 2 [00, 1) : s
Discrete random variables and their distributions Recall that a random variable X is called discrete if the range of possible values is finite or countably infinite Without loss of generality, we will assume that X 2 {x 1, x 2, x 3,} Since we can t know the value of X before performing the experiment, we characterize X by describing how likely each value is That is, for each value x i in the range of X,wedefine f (x i )=Pr(X = x i ) it, 2,3, which is the probability that X will take on the value x i The collection of probabilities f (x 1 ), f (x 2 ), f (x 3 ), define the probability mass function (pmf) of X and they describe the distribution of X
- Example Toss a coin three times and let X be the number of H observed Find the probability mass function (pmf) of X XELO, 1,2, K, 22 " 3 " 4 Ho )=Pr(X=o ) = 3 } f b % % 18 f4)=pr(x=d = fh=pr(x=y= f fbtprlx =D = ft
,,l2 " Example Roll two dice and let X be the sum of the two numbers Find the pmf of X XER, 3,4, } fh=pr(x=2)=3t # 436256 }z fb)=pr(x=d= fl4i=prlx=4)=
Clips of flip a coin until you observe H N = # of coin Find the pmf N Nell, 2,3, } f(d=pr(n=d= E fh=pr( Not =L I = at % D= Pr(N=2o)=#' 9 } i: w1=pr(n=w)=#n
Properties of the pmf Let X be a discrete random variable X 2 {x 1, x 2, x 3,} with probability mass function f (x 1 ), f (x 2 ), f (x 3 ), The numbers f (x i ), i =1, 2, must satisfy the following properties I f (x i ) 0; I f (x 1 )+f (x 2 )+f (x 3 )+ = 1X f (x i )=1 i=1 Oefki ) < 1
Major discrete distributions Bernoulli distribution A discrete random variable X has a Bernoulli distribution if it can only take two possible values, sometimes X 2 {0, 1} The pmf of a Bernoulli random variable is 1 = 0 = f (0) = Pr(X = 0) f (1) = Pr(X = 1) " ' ' success failure " " Convention: f (1) = Pr(X = 1) = p thus f (0) = Pr(X = 0) = 1 p Notation X Bernoulli(p)
Binomial distribution Consider an experiment whose outcome can be either success or failure Assume that Pr(success) = p on each trial Repeat this experiment n times Examples: I Flip a coin 10 times, think of H as success and T as failure on each trial; I Observe 20 items coming out of a production line and record whether they are defective or not I Perform a clinical trial and record whether a patient recovers from her symptoms or not A random variable X has a Binomial distribution if it describes the total number of successes in n independent and identical trials X Binomial(n, p)
Binomial distribution Repeat the same trial n times and let p be the probability of success on any given trial Let X denote the total number of successes in n trials We say that X Binomial(n, p) ( X has a Binomial distribution with parameters n, p) Note that X 2 {0, 1, 2, 3,,n 1, n} What is the probability mass function (pmf) of X? flu --Pr(X=o)=kpT ftpprl#d=wp(rpymfh=pr(xz2)=(y)p2ltpt2 flk)=pr(x=k)=( Ye )p4ra " k=o, 1,2,,w
Binomial distribution X Binomial(n, p) then X 2 {0, 1, 2,,n} and X has probability mass function n f (i) =Pr(X = i) = p i (1 i p) n i i =0, 1, 2,,n
Binomial distribution Connection to the Bernoulli(p) distribution: Let p 2 (0, 1) and consider n random variables X 1, X 2,,X n which are independent and identically distributed (iid) random variables with X i Bernoulli(p) Then Y = X 1 + X 2 + + X n counts the number of successes among the n variates X 1, X 2,,X n Thus, Y Binomial(n, p)
Exercise Suppose that a random variable X has the Binomial distribution with parameters n = 15 and p =05 FindPr(X < 6) XELO,1,, 15 ) flitprlxai ) fi?)picipj5ipr(xc6)=pr(x=o)tmx=dttprlx=5)=lyhsild'stci9thlh4t
Exercise Suppose that a random variable X has the Binomial distribution with parameters n =8and p =07 FindPr(X 5) exercise