Random Variable: a Random Variable Is a Real-Valued Function Defined on a Sample Space

Random Variable: a Random Variable Is a Real-Valued Function Defined on a Sample Space

Random Variable: A random variable is a real-valued function defined on a sample space. Discrete Random Variable: When the possi- ble values of a random variable are countable, then we say the random variable is a discrete random variable. It is relatively easier to understand discrete random variables. Note that countable means that either the set has finite many elements or we can establish a one-one correspondence be- tween the elements and the integers 1, 2, 3,.... So we can list all the elements in the countable set one by one. For example, an infinite-countable-many set usually has the form a ,a ,a ,...,a ,..., . { 1 2 3 k } 2 Notation 1. We use ω to denote the outcome in the sample space S. 2. Uppercase letters are usually used to denote random variables. For example, X is a random variable. We use lowercase letter x to denote the value of X. 3. We use to denote the collection of the X possible values of the random variable X. So = X(ω), ω S . X { ∈ } 4. If there are more than two random variables, like X and Y , then we add a subscript like XX to distinguish them. XY 5. Often we use the abbreviation r.v. instead of random variable. 3 Discrete Random Variable Defined on a Finite Sample Space Let us consider a finite sample space. S = ω ,ω ,...,ωn . { 1 2 } Let X be a random variable on S, which means that X is a real-valued function whose argu- ments are ωs in S. Let xi = X(ωi) for i = 1, 2,...,n. Then = x ,x ,...,xn . X { 1 2 } Note that it is ok to have some xis that are the same. Any well-defined rule can be used to define a random variable X on S. We see some exam- ples in the next few pages. 4 Examples of Discrete R.V. Ex1: Toss a coin. S = H,T . { } Let X(T ) = 1 and X(T ) = 0 then we define a r.v. X. = 1, 0 . X { } Ex2: Roll a die. S = 1, 2, 3, 4, 5, 6 . { } Let X(i) = i for i = 1, 2, 3, 4, 5, , 6. = XX 1, 2, 3, 4, 5, 6 . { } Or we can define another r.v. Y by Y (1) = Y (3) = Y (5) = 1 and Y (2) = Y (4) = Y (6) = 0. = 1, 0 . In this example we see different XY { } arguments could give the same value to Y . Ex3: Toss 2 coins. S = (H,H), (H,T ), (T,H), (T,T ) . { } Let X be the number of heads. Then X((H,H)) = 2, X((H,T )) = X((T,H)) = 1, X((T,T )) = 0. = 2, 1, 0 . X { } 5 Probability Function Since the argument of the random variable X is random, the value of X is random too. It is natural to ask what is the probability that the value of X is equal to x?(x is some real number). Probability Function: Probability function (p.f.) of the discrete random variable X is defined as f(x) = Pr(X = x)= p(ω). ω:XX(ω)=x p(ω) is the probability distribution on the finite sample space. We use probability function f(x) to describe the distribution of X. If A is a subset of then X Pr(X A)= f(xi). ∈ x A Xi∈ 6 In Ex1, f(1) = Pr(X = 1) = p(H) = 0.5 and f(0) = Pr(X =0)= p(T ) = 0.5. 1 In Ex2, Pr(X = i)= p(i)= 6. i = 1, 2, 3, 4, 5, 6. 1 Pr(Y =1)= p(1) + p(3) + p(5) = , 2 1 Pr(Y =0)= p(2) + p(4) + p(6) = . 2 1 In Ex3, f(2) = Pr(X = 2) = p((H,H)) = 4 and f(1) = Pr(X =1)= p((H,T ))+p((T,H)) = 1 1 4 + 4 = 1/2, f(0) = Pr(X = 0) = p((T,T )) = 1 4. Ex4: Roll 2 dice. Let X be the sum of the two numbers. Find Pr(X = 5)? Solution: f(5) = Pr(X =5)= p((4, 1)) + p((1, 4)) + p((3, 2)) + 4 1 p((2, 3)) = 36 = 9. 7 Three Common Discrete Distributions Let x1,x2,...,xk be distinct real numbers. If we have a function f(x) such that f(x ) 0, i ≥ for all i = 1, 2,...,n, and n f(xi) = 1. iX=1 Then f can be a probability function of X which takes value from = x ,x ,...,x . X { 1 2 k} Ex1: X takes value from 1, 0 . Let Pr(X = { } 1) = f(1) = p and Pr(X = 0) = f(0) = 1 − p = q. Then We say X is a Bernoulli random variable whose probability of success is p. We write X Ber(p). ∼ 8 Ex2: Let = 0, 1, 2,...,n . Take a positive X { } real number p, 0 <p< 1. Let n k n k f(k)= p (1 p) − . k − By Binomial theorem we check n n n k n k n f(k)= p (1 p) − = (p+1 p) = 1. k − − kX=0 kX=0 Thus we can use f(k) to define a distribu- { } tion. We say X is a binomial random vari- able with parameters (n,p) if X takes value from 0, 1, 2,...,n and Pr(X = k) = f(k) = { } n pk(1 p)n k. We write X Bin(n,p). k − − ∼ Ex3: We say X is a uniform random variable on x1,x2,x3,...,xk if Pr(X = xi) = f(xi) = 1 { } k for i = 1, 2,...,k. Remark: Two random variables can have the same distribution. 9 Some Bernoulli examples: 1. In a state gov- ernor election voters vote for two candidates, R and D. Randomly pick a voter, let X =1 if the voter votes for R and X = 0 if the voter votes for D. Then X is a Bernoulli random vari- able. What is the probability of success p? p should be the probability that a randomly se- lected voter votes for R. # of voters for R p = . # of all voters 2. Let A be some event. We define a random variable X as follows 1 if ω A X(ω)= ∈ ( 0 otherwise X is a Bernoulli random variable. Its probability of success is p = Pr(X = 1) = p(ωi) ωi:XX(ωi=1) = p(ωi)= p(A). ω A X∈ 10 Some Binomial examples: 1. Toss a biased coin 100 times p(H) = 0.6 p(T ) = 0.4. Let X be the number of heads in 100 tosses. 100 k 100 k Pr(X = k)= 0.6 0.4 − . k So X Bin(100, 0.6). ∼ 2. Let X be the number of women in a Jury. n = 12. X takes value from 0, 1, 2,..., 12 . { } Let p be the probability that a random chosen person is a woman and 1 p be the probability − that a random chosen person is a man. Then 12 k 12 k Pr(X = k)= p (1 p) − . k − So X Bin(12,p). ∼ What is p? p is the percentage of women in the district. 11 Some Uniform r.v. examples: 1. Roll a die. 1 f(k)= 6, k = 1, 2, 3, 4, 5, 6. 2. The last digit of your SSN. It is uniformly distributed on 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 . { } Normalizing constant: Suppose that X has probability function c f(x)= , x = 1, 2, 3, 4, 5 x2 Find the value of the constant c. Solution: Since f is a p.f. we must have 5 c 1= ( )= f x 2. x x X xX=1 Thus c = ( 5 1 ) 1 = 0.683. x=1 x2 − P Remark: c is often called the normalizing con- stant of the distribution. In some applications we know the probability function upto a con- stant. Then a practically important question is to compute the value of that constant, as we did in the above example. 12 Distribution Functions We start with the discrete random variables. Definition: Let X be a discrete random vari- able. = x ,x ,x ,..., and x < x < x < X { 1 2 3 } 1 2 3 . .. The distribution function of X is given by F (x) = Pr(X x) for <x< ≤ −∞ ∞ Note that in terms of the probability function of X F (x)= f(xi). x :x x i Xi≤ Sometimes we also call F (x) the CDF of X. 13 Example Suppose x1 = 0,x2 = 1,x3 = 2,x4 = 3.f(x1)= 1 2 2 3 8, f(x2) = 8, f(x3) = 8, f(x4) = 8. f is the p.f. of X. Let’s compute the distribution func- tion of X. F ( 1) = 0. − 1 1 F (0) = f(x1)= 8, F (0.5) = f(x1)= 8. 3 F (1) = f(x1)+ f(x2) = 8, F (1.5) = f(x1)+ 3 f(x2)= 8. 5 F (2) = f(x1)+ f(x2)+ f(x3) = 8, F (2.5) = 5 f(x1)+ f(x2)+ f(x3)= 8. F (3) = f(x1) + f(x2) + f(x3) + f(x4) = 1, F (3.25) = f(x1)+ f(x2)+ f(x3)+ f(x4) = 1. 14 o F(x) o o o 0.0 0.2 0.4 0.6 0.8 1.0 −1 0 1 2 3 4 x The above figure shows the sketch F (X). Form the graph we can see that F (x) has three prop- erties. If x <x then F (x ) F (x ). ”=” can 1 2 1 ≤ 2 be taken.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    41 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us