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
Random Variables Random variables Sometimes it makes sense to assign a value to an event: A drunkard making a random walk might be more interested in its position than in the direction and order of the steps he took. A gambler might be more interested in his current capital than in the series of colours already shown at the roulette table. If you play Settlers of Catan or Monopoly, you are probably more interested in the sum of the outcomes of the two dice than in the separate outcomes (unless you suspect that the dice are not fair). Probability III Random Variables Recall that the Borel σ-algebra on R, B is the smallest set generated by the open (or closed) intervals of R. Definition Given a sample space (Ω, F), a random variable is a function X : Ω → R with the property that the set {ω ∈ Ω : X (ω) ∈ B} belongs to F for each Borel set B ∈ B, where B is the Borel σ-algebra on R. We say that X is F-measurable. Abuse of notation: {X ∈ B} := {ω ∈ Ω : X (ω) ∈ B} and {X ≤ x} := {ω ∈ Ω : X (ω) ≤ x}. Furthermore, P(X ∈ B) := P({X ∈ B}). Probability III Random Variables Proposition X is F-measurable if and only if {X ≤ x} := {ω ∈ Ω : X (ω) ≤ x} belongs to F. Proof: ∞ (−∞, x] = [∪∞ n=1 (x − n, x)] ∪ [∩n=1 (x − 1/n, x + 1/n)], so, if X is F measurable then {ω ∈ Ω : X (ω) ∈ (−∞, x]} belongs to F Suppose that {ω ∈ Ω : X (ω) ∈ (−∞, x]} belongs to F, then {ω ∈ Ω : X (ω) ∈ (a, b)} = {ω ∈ Ω : X (ω) ∈ (−∞, a]}c ∩[∪∞ n=1 {ω ∈ Ω : X (ω) ∈ (∞, b−1/n]}] belongs to F, and therefore for every element B of the generating set of B, {ω ∈ Ω : X (ω) ∈ B} belongs to F Probability III Random Variables Up to now we did not assign a probability measure to the random variable X yet. However, there is one natural candidate: Definition The distribution measure µX of the random variable X is the probability measure on (R, B) defined by µX (B) = P(X ∈ B) for Borel sets B ∈ B. Note that for disjoint sets B1 , B2 , · · · ∈ B ∞ ∞ µX (∪∞ i=1 Bi ) = P(X ∈ ∪i=1 Bi ) = P(∪i=1 {X ∈ Bi }) ∞ ∞ X X = P(X ∈ Bi ) = µX (Bi ) i=1 Obviously, µX (R) = P(X ∈ R) = P(Ω) = 1. So, µX is indeed a probability measure. Probability III i=1 Random Variables Example A coin is tossed 10 times. Heads appears with probability p Ω = {ω = (ω1 , · · · , ω10 ); ωi ∈ {H, T }} F is the power set of Ω P X (ω) = 10 1 i = H), i.e., X is the number of heads i=1 1(ω P n P(ω) = p (1 − p)10−n , where n = 10 1 i = H) i=1 1(ω 10 X P(X = n) = |{ω ∈ Ω : 1(ω 1 i = H) = n}|p n (1 − p)10−n i=1 10 n = p (1 − p)10−n n So X is Bin(10, n) distributed Probability III Random Variables Distribution function Definition The distribution function of the random variable X is the function FX : R → [0, 1] given by FX (x) = P(X ≤ x) := µX ((−∞, x]) The distribution function FX , determines µX , since intervals of the form (−∞, x] generate the Borel σ-algebra B. Probability III Random Variables Some properties of the distribution function F (x) := FX (x) lim F (x) = 0 and lim F (x) = 1 x→−∞ x→∞ Proof: Let Bn = {X ≤ −n}. the B1 , B2 , · · · is a decreasing sequence of events with the empty set as limit. We saw in the previous lecture that this implies that P(Bn ) → P(∅) = 0. The second statement follows in a similar fashion. if x < y then F (x) ≤ F (y ), because F (y ) = P(X ≤ y ) = P(X ≤ x) + P(x < X ≤ y ) ≥ P(X ≤ x) = F (x). F (x) is right continuous, since {X ≤ x + 1/n} is a decreasing sequence of events with limit {X ≤ x}. By monotonicity of F (x) the claim follows. Probability III Random Variables Discrete random variables X is called discrete if it takes values in some countable (finite or infinite) subset {x1 , x2 , · · · } of RPsuch that its distribution measure can be represented as µX (B) = xi ∈B pX (xi ) for B ∈ B and some function pX : {x1 , x2 , · · · } → [0, 1]. Examples Bernoulli(p) distribution p(1) = 1 − p(0) = p Binomial(n, p) distribution p(k) = kn p k (1 − p)n−k for k = 0, 1, · · · , n Poisson(λ) distribution p(k) = λk −λ k! e for k ∈ N ∪ {0} Geometric(p) distribution p(k) = p(1 − p)k−1 for k ∈ N \ {0} r k−r Negative binomial(r , p) distribution p(k) = k−1 r −1 p (1 − p) for k ∈ N ∩ [r , ∞) Probability III Random Variables Continuous random variables X is called continuous if Rits distribution measure can be represented as µX (B) = B fX (x)dx for B ∈ B and some integrable function fX : R → [0, ∞). Examples Uniform(a, b) distribution f (x) = 1/(b − a), for a < x < b Exponential(λ) distribution f (x) = λe −λx for x ≥ 0 2 Normal(µ, √ σ ) distribution f (x) = ( 2πσ 2 )−1 exp(−(x − µ)2 /(2σ 2 )) for x ∈ R Gamma(λ, t) distribution (x) = (Γ(t))−1 λt x t−1 e −λx for R ∞ ft−1 x ≥ 0, where Γ(t) = 0 x e −x dx Cauchy distribution f (x) = Probability III 1 π(1+x 2 ) for x ∈ R Random Variables side remarks A random variable might be a mixture of continuous and discrete random variables Recreational: There exist also random variables, which are neither continuous nor discrete (singular random variables). An example is the random variable with distribution function the Cantor function. This distribution has no atoms (The distribution function is continuous), and it has derivative 0 at any point not in the Cantor set (which is uncountable). In the Cantor set it has no derivative. For more information: http://en.wikipedia.org/wiki/Cantor_function Probability III Random Variables Proposition Let the σ-algebra A be generated by a finite partition P = {A1 , · · · An }. Then the function P Y is A measurable if and only if Y may be written as Y (ω) = ni=1 yi1(ω 1 ∈ Ai ) for some constants y1 , y2 , · · · , yn . That is, Y is constant on each element of P. Proof: Assume that Y is A measurable. For given Ai , choose some ωi ∈ Ai , and set yi = Y (ωi ). Ãi = {ω : Y (ω) = yi } ∈ A.Since Y is A-measurable, it follows that Ãi is the union of some sets in P and it contains the whole of Ai (the smallest set in A containing ωi ). The other implication follows since for any Borel set B {ω ∈ Ω : Y (ω) ∈ B} can be written as the union of sets in P such that their yi ’s are in B. Probability III Random Variables Example Ω = [0, 1], B is the Borel σ-algebra on Ω. P1 = {[0, 1/4], (1/4, 1/2], (1/2, 3/4], (3/4, 1]} P2 = {[0, 1/2], (1/2, 1]} Y (x) = min{n ∈ N : n ≥ 4x} for x ∈ [0, 1] Pi generates Ai for i = 1, 2 Y is A1 measurable, but not A2 -measurable. Probability III Random Variables Definition The σ-algebra generated by the random variable X is the smallest σ-algebra A such that X is A measurable. Example: 3 coin tosses Ω = {(ω1 , ω2 , ω3 ), ωi ∈ {H, T }} X (ω) is the number of heads. The smallest σ-algebra containing A0 = {(T , T , T )} A1 = {(T , T , H), (T , H, T ), (H, T , T )} A2 = {(T , H, H), (H, T , H), (H, H, T )} A3 = {(H, H, H)} is the σ-algebra generated by X Probability III Random Variables Extra exercises Solve itens a) and c). 1)(Exam 2008) Let Ω = {1, . . . , 6} denote the sample space when a dice is rolled once. Define X(ω) = 1{ω∈{1,2}} and Y(ω)= 1{ω∈{2,3}} . a) Derive the smallest σ-algebra F that makes X a measurable rando variable. b) Introduce the uniform probability measure P and calculate E (Y | F). c )Derive the smallest σ-algebra G that makes X and Y measurable random variables. Probability III Random Variables Extra exercises 1)Show that if X1 , X2 , . . . are random variables (i.e. F-measurable functions), then infn Xn (ω) and supn Xn are random variables Hint: By the proposition seen in class (and here) we only need to check that {supn Xn ≤ x} ∈ F for x ∈ R. Probability III