Random variablesDiscrete Random VariablesJuana [email protected] Department of StatisticsJ. Sanchez Stat 100A Intro ProbabilityRecommended reading: Ross, chapter 4 (8th edition, 9th edition)(4.1-4.5 ).I. Definition of a discrete random variableII. Definition of probability of the value of a discrete randomvariable. Probability distribution of a discrete random variable.III. Definition of expected value, variance and standard deviation ofa discrete random variable and of a function of a discrete randomvariable.J. Sanchez Stat 100A Intro ProbabilityI. Definition of a random variableDefinition of Random VariableA random variable X is a function from a sample space S into the realnumbers. Random variables can be discrete or continuous, depending onthe type of sample space.We denote the name of the random variable by a capital letter, andpossible values of the random variable by the same but lowercase letter.We start in this lesson with discrete random variable.J. Sanchez Stat 100A Intro ProbabilityII. Definition of discrete random variableDiscrete random variableA random variable that can take on at most a countable number ofpossible values is said to be discrete.Probability mass functionLet sibe an outcome in a countable sample space with k outcomes S ,i = 1, ...., kP(X = x) =XiP(si∈ S | X(si) = x)The probability is positive for at most a countable number of values of a.ThusXxP(X ) = 1. A probability mass function gives all possible values of X and theirprobabilities.J. Sanchez Stat 100A Intro ProbabilityII. Probability Distribution of a discrete random variableDefinition of Probability distribution of a discrete random variable.The probability distribution of a discrete random variable consists of allthe unique values of the random variable and the probability of each ofthese values. For discrete random variables, it is also called probabilitymass function. It can be represented in a table (when that is not toolong), with a formula (if we can figure or someone has figured it out), orwith a graph.J. Sanchez Stat 100A Intro ProbabilityConstruction of a probability distribution.In a family of 3, where probability of a girl is 1/2,Sample Space bbb, bbg, bgb, bgg, gbb, gbg, ggb, gggProbabilities (1/2)3, (1/2)3, (1/2)3, (1/2)3, (1/2)3, (1/2)3, (1/2)3, (1/2)3Let A be the event ”at least two girls”A = {bgg, gbg , ggb, ggg }.P(A) = 4(1/2)3= 1/2.J. Sanchez Stat 100A Intro ProbabilityIn that example, we could represent the problem in terms of randomvariable X, the number of girls in a family of 3Sample Space bbb, bbg, bgb, bgg, gbb, gbg, ggb, gggRandom variable X 0, 1, 1, 2, 1, 2, 2, 3Probabilities (1/2)3, (1/2)3, (1/2)3, (1/2)3, (1/2)3, (1/2)3, (1/2)3, (1/2)3And thenP(A) = P(X ≥ 2) = 1/2J. Sanchez Stat 100A Intro ProbabilityThe representation above is not complete. A probability distributionspecifies unique values of the random variable and their probabilities. Welearn in this lesson to represent the probability distribution of a randomvariable. In the above case, the probability distribution of X (”number ofgirls in a family of 3”) is:X P(X)030(1/2)0(1/2)3= 1/8131(1/2)1(1/2)2= 3/8232(1/2)2(1/2)1= 3/8333(1/2)3(1/2)0= 1/8And we can grab the answer directly from the probability distribution:P(A) = P(X ≥ 2) = (3/8 + 1/8) = 4/8 = 1/2J. Sanchez Stat 100A Intro ProbabilityConstruction of another probability distribution.Two fair dice are tossed. The firsttoss is denoted by a and thesecond by b. Let X be a functionthat assigns to each point (a, b) inS the maximum of its numbers,i.e. X (a, b) = max (a, b). Then Xis a random variable that can takethe possible valuesS =(1, 1) (1, 2) (1, 3) (1, 4) (1, 5) (1, 6)(2, 1) (2, 2) (2, 3) (2, 4) (2, 5) (2, 6)(3, 1) (3, 2) (3, 3) (3, 4) (3, 5) (3, 6)(4, 1) (4, 2) (4, 3) (4, 4) (4, 5) (4, 6)(5, 1) (5, 2) (5, 3) (5, 4) (5, 5) (5, 6)(6, 1) (6, 2) (6, 3) (6, 4) (6, 5) (6, 6)Probability mass function for XX P(X)1 1/362 3/363 5/364 7/365 9/366 11/36J. Sanchez Stat 100A Intro ProbabilityLet A the event that X > 3, B theevent that X ≤ 3 and C the eventthat X ≤ 2 ∪ X > 3.P(A) =736+936+1136=2736P(B) = 1 − P(A) =836P(C ) = 1 − P(X = 3) = 1 −536All rules of probability learned willapply as well.X P(X)1 1/362 3/363 5/364 7/365 9/366 11/36J. Sanchez Stat 100A Intro ProbabilityUsing Definition of probability of the value of a discreterandom variableThis is how we computed the probabilities. In the example whereX=max(a,b) in the roll of two fair dice,P(X=1) = P( (1,1) ) = 1/36P(X=2) =P( { (1,2), (2,2), (2,1) } ) =3/36P(X=3) = P({ (1,3), (3,1), (2,3), (3,2), (3,3) } ) = 5/36P(X=4) = P({(1,4), (2,4), (3,4), (4,4), (4,1), (4,2), (4,3) })= 7/36P(X= 5) = ....... etc.P(X=6)=J. Sanchez Stat 100A Intro ProbabilityUsing Definition of probability of the value of a discreterandom variableThis is how we computed the probabilities. In the example whereX=max(a,b) in the roll of two fair dice,P(X=1) = P( (1,1) ) = 1/36P(X=2) = P( { (1,2), (2,2), (2,1) } ) =3/36P(X=3) =P({ (1,3), (3,1), (2,3), (3,2), (3,3) } ) = 5/36P(X=4) = P({(1,4), (2,4), (3,4), (4,4), (4,1), (4,2), (4,3) })= 7/36P(X= 5) = ....... etc.P(X=6)=J. Sanchez Stat 100A Intro ProbabilityUsing Definition of probability of the value of a discreterandom variableThis is how we computed the probabilities. In the example whereX=max(a,b) in the roll of two fair dice,P(X=1) = P( (1,1) ) = 1/36P(X=2) = P( { (1,2), (2,2), (2,1) } ) =3/36P(X=3) = P({ (1,3), (3,1), (2,3), (3,2), (3,3) } ) =5/36P(X=4) = P({(1,4), (2,4), (3,4), (4,4), (4,1), (4,2), (4,3) })= 7/36P(X= 5) = ....... etc.P(X=6)=J. Sanchez Stat 100A Intro ProbabilityUsing Definition of probability of the value of a discreterandom variableThis is how we computed the probabilities. In the example whereX=max(a,b) in the roll of two fair dice,P(X=1) = P( (1,1) ) = 1/36P(X=2) = P( { (1,2), (2,2), (2,1) } ) =3/36P(X=3) = P({ (1,3), (3,1), (2,3), (3,2), (3,3) } ) = 5/36P(X=4) =P({(1,4), (2,4), (3,4), (4,4), (4,1), (4,2), (4,3) })= 7/36P(X= 5) = ....... etc.P(X=6)=J. Sanchez Stat 100A Intro ProbabilityUsing Definition of probability of the value of a discreterandom variableThis is how we computed the probabilities. In the example whereX=max(a,b) in the roll of two fair dice,P(X=1) = P( (1,1) ) = 1/36P(X=2) = P( { (1,2), (2,2), (2,1) } ) =3/36P(X=3) = P({ (1,3), (3,1), (2,3), (3,2), (3,3) } ) = 5/36P(X=4) = P({(1,4), (2,4), (3,4), (4,4), (4,1), (4,2), (4,3) })= 7/36P(X= 5) = .......
View Full Document