Understanding Expected Values: A Guide to Probabilities and

School
North Carolina State University**We aren't endorsed by this school
Course
ST 371
Subject
Computer Science
Date
Dec 12, 2024
Pages
13
Uploaded by AdmiralExploration4857
Lecture 9: Expected Values
Background image
Prob & Stats:Lecture 9IntroductionExpected ValueMotivationDefinitionExampleExpectation of a function ofXVarianceDefinitionExampleComputational FormulaExampleLinear FunctionsIntroductionThe last lecture we discussed how we can computeprobabilities based on distributions that arerepresentative of eliminating the assumption of equallylikely outcomes.Since dropping the equally likely outcomes assumptioncreates a distribution of probability among theoutcomes, or values the random variables, we becomeinterested in certain properties that these randomvariables possess.Namely, we are interested in the average value therandom variable attains and the variance between thevalues of the random variable.We will use knowledge of the probability distributions ofthese random variables to find answers to thesequestions.
Background image
Prob & Stats:Lecture 9IntroductionExpected ValueMotivationDefinitionExampleExpectation of a function ofXVarianceDefinitionExampleComputational FormulaExampleLinear FunctionsAverage Value of a Random VariableSuppose we are interested in the average number ofcourses that a student is taking here at NCSU thissemester. Further suppose thatXis the number ofcourses a randomly selected student is taking and out ofthe 35000 students at this university we have thefollowing distribution of students per number of courses:x123456Registered1050105045508750136505950How might we go about computing the average numberof courses per student?
Background image
Prob & Stats:Lecture 9IntroductionExpected ValueMotivationDefinitionExampleExpectation of a function ofXVarianceDefinitionExampleComputational FormulaExampleLinear FunctionsExpected ValuesDefinitionLetXbe a discrete random variable with set of possiblevaluesDand pmfp(x). Theexpected valueofX, denotedbyE(X)orµXis given byE(X) =XxDxp(x)In the creation of the above formula we saw how we canuse a specific probability distribution to compute theaverage value of a random variable. We can do thesame thing for when a pmf is a function with aparameter instead of a specific number.
Background image
Prob & Stats:Lecture 9IntroductionExpected ValueMotivationDefinitionExampleExpectation of a function ofXVarianceDefinitionExampleComputational FormulaExampleLinear FunctionsExample 1Exercise1.LetXbe a Bernoulli distributed random variable. Whatis the expected value ofX?2.LetYbe a geometric distribution with parameterp.What is the expected value ofY?
Background image
Prob & Stats:Lecture 9IntroductionExpected ValueMotivationDefinitionExampleExpectation of a function ofXVarianceDefinitionExampleComputational FormulaExampleLinear FunctionsExpected Value of a Function ofXOften times we are interested in computing theexpected value of afunctionof the random variablerather than the random variable itself.For example, what if we are interested in the averagenumber of credit hours that a student is taking, ratherthan the number of courses.Assume that all courses are 3 credit hours then if we letYequal the number of credit hours we can easily seethis as a function ofX.
Background image
Prob & Stats:Lecture 9IntroductionExpected ValueMotivationDefinitionExampleExpectation of a function ofXVarianceDefinitionExampleComputational FormulaExampleLinear FunctionsExpected Value of a Function ofXDefinitionIf the random variableXhas a set of possible valuesDandpmfp(x), then the expected value of any functionh(X),denoted byE(h(X))orµh(X)is computed byE(h(X)) =XxDh(x)p(x)
Background image
Prob & Stats:Lecture 9IntroductionExpected ValueMotivationDefinitionExampleExpectation of a function ofXVarianceDefinitionExampleComputational FormulaExampleLinear FunctionsSpecial CaseOften times the functionh(X)of the random variableXthat we are interested is a special type called alinearfunction.This means that the function has the formh(X) =aX+bfor some constantsaandb. Then wecan find the expected value of a function with this formbyDefinitionE(aX+b) =aE(X) +bProof:
Background image
Prob & Stats:Lecture 9IntroductionExpected ValueMotivationDefinitionExampleExpectation of a function ofXVarianceDefinitionExampleComputational FormulaExampleLinear FunctionsVariance of a Random VariableXAlso of interest in just how spread out those values are.Since we could use the probability distribution tocompute a measure of center, so can we use theprobability distribution to compute a measure ofvariance.This can be done through considering the expectation ofthe function ofXthat has the formh(X) = (Xµ)2.DefinitionLetXhave pmfp(x)and expected valueµ. Then thevarianceofX, denoted asV ar(X)orσ2XisV ar(X) =E((Xµ)2) =XxD(xµ)2p(x)
Background image
Prob & Stats:Lecture 9IntroductionExpected ValueMotivationDefinitionExampleExpectation of a function ofXVarianceDefinitionExampleComputational FormulaExampleLinear FunctionsExample 2ExerciseWhat is the variance of the number of courses that studentsat NCSU are taking?
Background image
Prob & Stats:Lecture 9IntroductionExpected ValueMotivationDefinitionExampleExpectation of a function ofXVarianceDefinitionExampleComputational FormulaExampleLinear FunctionsShortcut formula forV ar(X)The formula given for computing the variance ofXcaninvolve numerous arithmetic computations. We can finda more computationally friendly formula by expandingthe binomial:PropositionV ar(X) =E(X2)[E(X)]2Proof:
Background image
Prob & Stats:Lecture 9IntroductionExpected ValueMotivationDefinitionExampleExpectation of a function ofXVarianceDefinitionExampleComputational FormulaExampleLinear FunctionsExample 3ExerciseWhat is the variance of a Bernoulli random variable?
Background image
Prob & Stats:Lecture 9IntroductionExpected ValueMotivationDefinitionExampleExpectation of a function ofXVarianceDefinitionExampleComputational FormulaExampleLinear FunctionsVariance of a Linear FunctionJust like we could be interested in computing theexpected value of a function of a random variable wemight also be interested in the variance of that function.V ar(h(X)) =xD[h(x)E(h(X))]2p(x)Ifh(X)is a linear function then we have:PropositionV ar(aX+b) =a2σ2XProof:
Background image