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
MAT 446 Supplementary Note for Ch 3 Myung Song, Ph.D. © 2009 W.H. Freeman and Company Random Variables Definition For a given sample space S of some experiment, a random variable (rv) is any rule that associates a number with each outcome in S . In mathematical language, a random variable is a function whose domain is the sample space and whose range is the set of real numbers. 1.2 Random Variables Example 1. Flip a fair coin once S={H, T} X: # of heads X(H)=1, X(T)=0 Any random variable whose only possible values are 0 and 1 is called a Bernoulli rv. 2. Free Throws (4 times) S={HHHH, HHHM, … MMMH, MMMM} X: # of hits then X= 0, 1, 2, 3, 4 X(MMMM) = 0, X(HHMM) = 2, X(HHHM) = 3, … Two Types of Random Variables Discrete rv (in Ch3) A discrete random variable is an rv whose possible values either constitute a finite set or else can be listed in an infinite sequence in which there is a first element, a second element, and so on. ex) Examples in the previous page. 1.4 Two Types of Random Variables Continuous rv (in Ch4) A random variable is continuous if both of the following apply: 1. Its set of possible values consists either of (1) all numbers in a single interval on the number line (possibly infinite in extent) or (2) all numbers in a disjoint union of such intervals. ex) (1, 5), [2, 7] (10, 100) 2. No possible value of the variable has positive probability, that is, P(X = c) = 0 for any possible value c. Probability Distributions for Discrete rv Definition Parameter Definition Suppose p(x) depends on a quantity that can be assigned any one of a number of possible values, with each different value determining a different probability distribution. Such a quantity is called a parameter of the distribution. The collection of all probability distributions for different values of the parameter is called a family of probability distributions. Tip: - Parameters are quantities explaining the characteristics of the distributions - They are associated with central location, variation, skewness, kurtosis,….. Cumulative Distribution Function Definition The cumulative distribution function (cdf) F(x) of a discrete rv X with pmf p(x) is defined for every number x by For any number x, F(x) is the probability that the observed value of X will be at most x. Cumulative Distribution Function Proposition Cumulative Distribution Function Properties 1. lim F ( x) 0 and lim F ( x) 1 x x 2. F(x) is non-decreasing. 3. F(x) is right continuous i.e. lim F ( x) F (a) xa 3.3 Expected Values of Discrete Random Variables The Expected Value of X Definition The Expected Value of X Ex) (after example 3.15) Let X be the number of credit cards owned by a randomly selected adults. The corresponding pmf is following: x 0 1 2 3 P(x) 0.1 0.2 0.4 0.3 What is the expected number of credit cards? The Expected Value of X Ex) Geometric Distribution (after Example 3.18) 0.6 x 10.4 p( x) 0 x 1, 2,... o.w. What is the expected value of X? The Expected Value of a function Proposition The Expected Value of a function Proposition The Expected Value of a function Ex) Credit Cards example – Continued (after example 3.22) (1) What is the expected value of X-1? (2) What is the expected value of 2X? (3) What is the expected value of 2X+3? The Variance of X Definition Let X have pmf p(x) and expected value m. Then the 2 2 variance of X, denoted by V(X) or X , or just The standard deviation (SD) of X is The Shortcut Formula for Variance Proposition The Variance of X Ex) Credit Cards Let X be the number of credit cards owned by a randomly selected adults. The corresponding pmf is following: x 0 1 2 3 P(x) 0.1 0.2 0.4 0.3 What is the variance of credit cards? (Hint: E(X) = 1.9) The Rules of Variance Proposition The Variance of X Ex) Credit Cards example – Continued (1) What is the variance of X-1? (2) What is the variance and the standard deviation of 2X? (3) What is the variance and the standard deviation of 2X+3? 3.4 Moments and Moment Generating Functions Moment Definition The k moment of X about E[( X - ) ] th k The k moment of X (about 0) E[ X ] th Examples Why moments? k Moment Generating Function Definition The moment generating function (mgf) of a discrete random variable X is defined to be where D is the set of possible X values. (note: Mx(t) is a function of t NOT x ) We will say that the mgf exists if it is defined for an open interval including 0. Moment Generating Function Examples - Example 3.26 - Bernoulli r.v. (related to Example 3.27) 1 p p( x) p 0 if x 0 if x 1 o.w. - Geometric Dist’n (related to Example 3.29) (1 p ) x 1 p p( x) 0 x 0,1, 2,... o.w. Moment Generating Function Proposition If the mgf exists and is the same for two distributions, then the two distributions are the same. That is, the mgf uniquely specifies the probability distribution; there is a one-to-one correspondence between distributions and mgf’s. Example Moment Generating Function Theorem For example, Moment Generating Function Example 3.31 Ex) Let X be the number of defectives by a randomly selected machine. The corresponding pmf is following: X 0 1 2 P(x) 0.6 0.3 0.1 Calculate E(X) and V(X) by using mgf. Moment Generating Function Ex) Geometric Distribution (related to Example 3.32) (1 p) x 1 p p( x) 0 x 1, 2,3,... o.w. What is the mgf of X? Calculate E(X) and V(X) by using mgf. Cummulant Generating Function Definition The Cummulant Generating Function of X, Rx(t) is defined as: Rx (t ) ln[ M x (t )] Properties Cummulant Generating Function Ex) Geometric Distribution (related to Example 3.33) (1 p) x 1 p p( x) 0 x 1, 2,3,... o.w. What is the cummulant generating function of X? Calculate E(X) and V(X) by using cummulant generating function Binomial Probability Distribution THE BINOMIAL SETTING 1. The number of trials n is fixed before experiments 2. For each trial, only two results “success” and “failure.” 3. The trials are independent. 4. The probability of a success p is fixed. Binomial rv and Distribution Definition Given a binomial experiment consisting of n trials, the binomial random variable X associated with this experiment is defined as X = the number of successes among the n trials Notation Because the pmf of a binomial rv X depends on the two parameters n and p, we denote the pmf by b(x; n, p). We will often write X ~ Bin(n, p) to indicate that X is a binomial rv based on n trials with success probability p. Binomial rv and Distribution Our first step in finding a formula for the binomial pmf that a binomial rv takes any value is adding probabilities for the different ways of getting exactly that many successes in n trials. Binomial Coefficient The number of ways of arranging k successes among n trials is given by the binomial coefficient, 𝑛 𝑛! = , read “n choose k” (if nothing else, to 𝑘! 𝑛−𝑘 ! 𝑘 𝑛 distinguish it from the fraction ), for k = 0, 1, 2, …, n. 𝑘 Note: factorial notation, 𝑛! = 𝑛 𝑛 − 1 𝑛 − 2 ∙ ⋯ ∙ 3 2 1 0! = 1 Binomial rv and Distribution The binomial coefficient counts the number of different ways in which x successes can be arranged among n trials. The pmf b(x: n, p) is this count multiplied by the probability of any one specific arrangement of the x successes. Binomial Probability n x n x b( x; n, p ) p (1 p ) x Number of arrangements of x successes Probability of x successes Probability of n-x failures Binomial rv and Distribution Notation Expectation and Variance of X Proposition If X ~ Bin(n, p), then E ( X ) np V ( X ) np (1 p ) X np(1 p) Moment Generating Function of X Proposition If X ~ Bin(n, p), then M X (t ) ( pe 1 p ) t n Poisson Probability Distribution Introduction to Poisson Distribution The Poisson distribution is popular for modeling the number of times an (rare) event occurs in an interval of time or space. Example The number of meteors greater than 1 meter diameter that strike earth in a year. The number of patients arriving in an emergency room between 11 and 12 pm The number of London bombing in a week during WW2. Poisson Probability Distribution Definition A random variable X is said to have a Poisson distribution with parameter ( 0) if the pmf of X is As and such that the mean value remains constant Poisson Distribution as a Limit Proposition The Mean, Variance and MGF of X Proposition If X ~ Poisson( ), then and