Review Some Basic Statistical Concepts.

Slides:



Advertisements
Similar presentations
CS433: Modeling and Simulation
Advertisements

CmpE 104 SOFTWARE STATISTICAL TOOLS & METHODS MEASURING & ESTIMATING SOFTWARE SIZE AND RESOURCE & SCHEDULE ESTIMATING.
Chapter 5 Discrete Random Variables and Probability Distributions
1. Are Women Paid Less than Men? Intro and revision of basic statistics.
Lecture 2 Today: Statistical Review cont’d:
Lecture note 6 Continuous Random Variables and Probability distribution.
Chapter 2: Probability Random Variable (r.v.) is a variable whose value is unknown until it is observed. The value of a random variable results from an.
Probability Densities
Class notes for ISE 201 San Jose State University
Chapter 6 Continuous Random Variables and Probability Distributions
Sections 4.1, 4.2, 4.3 Important Definitions in the Text:
Statistical Background
Continuous Random Variables and Probability Distributions
Copyright © 2014 by McGraw-Hill Higher Education. All rights reserved.
Chapter 5 Continuous Random Variables and Probability Distributions
Review of Probability and Statistics
The joint probability distribution function of X and Y is denoted by f XY (x,y). The marginal probability distribution function of X, f X (x) is obtained.
1A.1 Copyright© 1977 John Wiley & Son, Inc. All rights reserved Review Some Basic Statistical Concepts Appendix 1A.
12.3 – Measures of Dispersion
Random Variable and Probability Distribution
Chapter 21 Random Variables Discrete: Bernoulli, Binomial, Geometric, Poisson Continuous: Uniform, Exponential, Gamma, Normal Expectation & Variance, Joint.
Econ 482 Lecture 1 I. Administration: Introduction Syllabus Thursday, Jan 16 th, “Lab” class is from 5-6pm in Savery 117 II. Material: Start of Statistical.
Previous Lecture: Sequence Database Searching. Introduction to Biostatistics and Bioinformatics Distributions This Lecture By Judy Zhong Assistant Professor.
Chapter 1 Probability and Distributions Math 6203 Fall 2009 Instructor: Ayona Chatterjee.
Short Resume of Statistical Terms Fall 2013 By Yaohang Li, Ph.D.
Lecture 3 A Brief Review of Some Important Statistical Concepts.
Theory of Probability Statistics for Business and Economics.
Sullivan – Fundamentals of Statistics – 2 nd Edition – Chapter 11 Section 1 – Slide 1 of 34 Chapter 11 Section 1 Random Variables.
Review of Probability Concepts ECON 4550 Econometrics Memorial University of Newfoundland Adapted from Vera Tabakova’s notes SECOND.
Review of Probability Concepts ECON 6002 Econometrics Memorial University of Newfoundland Adapted from Vera Tabakova’s notes.
1 G Lect 4a G Lecture 4a f(X) of special interest: Normal Distribution Are These Random Variables Normally Distributed? Probability Statements.
Chapter 4 DeGroot & Schervish. Variance Although the mean of a distribution is a useful summary, it does not convey very much information about the distribution.
1 G Lect 2M Examples of Correlation Random variables and manipulated variables Thinking about joint distributions Thinking about marginal distributions:
CS433 Modeling and Simulation Lecture 03 – Part 01 Probability Review 1 Dr. Anis Koubâa Al-Imam Mohammad Ibn Saud University
Chapter 2 Statistical Background. 2.3 Random Variables and Probability Distributions A variable X is said to be a random variable (rv) if for every real.
Random Variable The outcome of an experiment need not be a number, for example, the outcome when a coin is tossed can be 'heads' or 'tails'. However, we.
Review of Probability. Important Topics 1 Random Variables and Probability Distributions 2 Expected Values, Mean, and Variance 3 Two Random Variables.
Lecture 3 1 Recap Random variables Continuous random variable Sample space has infinitely many elements The density function f(x) is a continuous function.
Probability Theory Modelling random phenomena. Permutations the number of ways that you can order n objects is: n! = n(n-1)(n-2)(n-3)…(3)(2)(1) Definition:
Random Variables. Numerical Outcomes Consider associating a numerical value with each sample point in a sample space. (1,1) (1,2) (1,3) (1,4) (1,5) (1,6)
Review of Probability Concepts Prepared by Vera Tabakova, East Carolina University.
Continuous Random Variables and Probability Distributions
Chapter 20 Statistical Considerations Lecture Slides The McGraw-Hill Companies © 2012.
CHAPTER – 1 UNCERTAINTIES IN MEASUREMENTS. 1.3 PARENT AND SAMPLE DISTRIBUTIONS  If we make a measurement x i in of a quantity x, we expect our observation.
Virtual University of Pakistan Lecture No. 26 Statistics and Probability Miss Saleha Naghmi Habibullah.
Function of a random variable Let X be a random variable in a probabilistic space with a probability distribution F(x) Sometimes we may be interested in.
Chapter 6: Random Errors in Chemical Analysis. 6A The nature of random errors Random, or indeterminate, errors can never be totally eliminated and are.
Biostatistics Class 3 Probability Distributions 2/15/2000.
L Basic Definitions: Events, Sample Space, and Probabilities l Basic Rules for Probability l Conditional Probability l Independence of Events l Combinatorial.
APPENDIX A: A REVIEW OF SOME STATISTICAL CONCEPTS
MECH 373 Instrumentation and Measurements
Probability and Statistics for Computer Scientists Second Edition, By: Michael Baron Chapter 3: Discrete Random Variables and Their Distributions CIS.
Physics 114: Lecture 13 Probability Tests & Linear Fitting
Discrete Random Variables
3. The X and Y samples are independent of one another.
Review of Probability Theory
Keller: Stats for Mgmt & Econ, 7th Ed
3.1 Expectation Expectation Example
Review of Probability Concepts
Some Basic Probability Concepts
Chapter 4 – Part 3.
MEGN 537 – Probabilistic Biomechanics Ch.3 – Quantifying Uncertainty
How accurately can you (1) predict Y from X, and (2) predict X from Y?
EMIS 7300 SYSTEMS ANALYSIS METHODS FALL 2005
AP Statistics Chapter 16 Notes.
CHAPTER – 1.2 UNCERTAINTIES IN MEASUREMENTS.
Chapter 2. Random Variables
Random Variables and Probability Distributions
Discrete Random Variables and Probability Distributions
CHAPTER – 1.2 UNCERTAINTIES IN MEASUREMENTS.
Presentation transcript:

Review Some Basic Statistical Concepts

Many of the things we will be interested in this class are random variables (RVs); that is, variables whose outcome is subject to chance. We do not know what value a RV will take until we observe it. Examples: outcome of coin toss; your starting salary after graduation.

Random Variable random variable: A variable whose value is unknown until it is observed. The value of a random variable results from an experiment. The term random variable implies the existence of some known or unknown probability distribution defined over the set of all possible values of that variable. In contrast, an arbitrary variable does not have a probability distribution associated with its values.

Controlled experiment values of explanatory variables are chosen with great care in accordance with an appropriate experimental design. Uncontrolled experiment values of explanatory variables consist of non-experimental observations over which the analyst has no control.

Discrete Random Variable A discrete random variable can take only a finite number of values, that can be counted by using the positive integers. Example: Prize money from the following lottery is a discrete random variable: first prize: Rs.1,000 second prize: Rs.50 third prize: Rs.5.75 since it has only four (a finite number) (count: 1,2,3,4) of possible outcomes: Rs.0.00; Rs.5.75; Rs.50.00; Rs.1,000.00

Continuous Random Variable A continuous random variable can take any real value (not just whole numbers) in at least one interval on the real line. Examples: Gross national product (GNP) money supply interest rates price of eggs household income expenditure on clothing

Dummy Variable A discrete random variable that is restricted to two possible values (usually 0 and 1) is called a dummy variable (also, binary or indicator variable). Dummy variables account for qualitative differences: gender (0=male, 1=female), race (0=white, 1=nonwhite), citizenship (0=Indian., 1=not Indian), income class (0=poor, 1=rich).

Every Random Variable (RV) has a probability distribution. A probability distribution describes the set of all possible outcomes of a RV, and the probabilities associated with each possible outcome. This is summarized by a probability distribution function (or pdf).

An alternate way to describe a probability distribution is the cumulative distribution function (or cdf). It gives the probability that a RV takes a value less than or equal to a given value, Pr(X ≤ x). Example: number of times a laptop crashes before a midterm;

Because continuous RVs can take an infinite number of values, the pdf and cdf cannot enumerate the probabilities of each of them. Instead we describe the pdf and cdf using functions. Usual notation for the pdf is f(x). Usual notation for the cdf is F(x) = Pr(X ≤ x). Because pdfs and cdfs of continuous RVs can also be complicated functions, we will just use pictures to represent them. We plot outcomes, x, on the horizontal axis, and probabilities, f(x) or F(x), on the vertical axis. The cdf is an increasing function that ranges from zero to one.

A list of all of the possible values taken by a discrete random variable along with their chances of occurring is called a probability function or probability density function (pdf). die x f(x) one dot 1 1/6 two dots 2 1/6 three dots 3 1/6 four dots 4 1/6 five dots 5 1/6 six dots 6 1/6

f(x) = P(X=xi) 0 < f(x) < 1 A discrete random variable X has pdf, f(x), which is the probability that X takes on the value x. f(x) = P(X=xi) Therefore, 0 < f(x) < 1 If X takes on the n values: x1, x2, . . . , xn, then f(x1) + f(x2)+. . .+f(xn) = 1. For example in a throw of one dice: (1/6) + (1/6) + (1/6) + (1/6) + (1/6) + (1/6)=1

In a throw of two dice, the discrete random variable X, f(x) =(1/36)(2/36)(3/36)(4/36)(5/36)(6/36)(5/36)( 4/36)(3/36)(2/36)(1/36) the pdf f(x) can be shown by the presented by height: f(x) 0 2 3 4 5 6 7 8 9 10 11 12 X number, X, the possible outcomes of two dice

A continuous random variable uses area under a curve rather than the height, f(x), to represent probability: f(x) red area green area 0.1324 0.8676 . . Rs.34,000 Rs.55,000 X per capita income, X, in the United States

Since a continuous random variable has an uncountably infinite number of values, the probability of one occurring is zero. P [ X = a ] = P [ a < X < a ] = 0 Probability is represented by area. Height alone has no area. An interval for X is needed to get an area under the curve.

The area under a curve is the integral of the equation that generates the curve: b P [ a < X < b ] = f(x) dx a For continuous random variables it is the integral of f(x), and not f(x) itself, which defines the area and, therefore, the probability.

Rules of Summation Rule 1: xi = x1 + x2 + . . . + xn Rule 2: kxi = k xi i = 1 Rule 3: xi +yi = xi + yi i = 1 n Note that summation is a linear operator which means it operates term by term.

Rules of Summation (continued) Rule 4: axi +byi = a xi + b yi i = 1 n n x1 + x2 + . . . + xn Rule 5: x = xi = 1 n n i = 1 The definition of x as given in Rule 5 implies the following important fact: n xi x) = 0 i = 1

Rules of Summation (continued) Rule 6: f(xi) = f(x1) + f(x2) + . . . + f(xn) i = 1 n Notation: f(xi) = f(xi) = f(xi) n x i i = 1 n Rule 7:  f(xi,yj) = [ f(xi,y1) + f(xi,y2)+. . .+ f(xi,ym)] i = 1 m j = 1 The order of summation does not matter :  f(xi,yj) =  f(xi,yj) i = 1 n m j = 1

The pdf and cdf effectively tell us “everything” we might want to know about a RV. But sometimes we only want to describe particular features of a probability distribution. One feature of interest in this course is the expected value or mean of a RV. Another useful measure of the dispersion

The Mean of a Random Variable The mean or arithmetic average of a random variable is its mathematical expectation or expected value, E(X).

Expected Value 1. Empirically: There are two entirely different, but mathematically equivalent, ways of determining the expected value: 1. Empirically: The expected value of a random variable, X, is the average value of the random variable in an infinite number of repetitions of the experiment. In other words, draw an infinite number of samples, and average the values of X that you get.

Expected Value 2. Analytically: The expected value of a discrete random variable, X, is determined by weighting all the possible values of X by the corresponding probability density function values, f(x), and summing them up. In other words: E(X) = x1f(x1) + x2f(x2) + . . . + xnf(xn)

Empirical vs. Analytical As sample size goes to infinity, the empirical and analytical methods will produce the same value. In the empirical case when the sample goes to infinity the values of X occur with a frequency equal to the corresponding f(x) in the analytical expression.

Empirical (sample) mean: x = xi/n i = 1 where n is the number of sample observations. Analytical mean: E(X) = xif(xi) i = 1 n where n is the number of possible values of xi. Notice how the meaning of n changes.

E (X) = xi f(xi) E (X ) = xi f(xi) E (X )= xi f(xi) The expected value of X: E (X) = xi f(xi) i=1 n The expected value of X-squared: E (X ) = xi f(xi) i=1 n 2 It is important to notice that f(xi) does not change! The expected value of X-cubed: E (X )= xi f(xi) i=1 n 3

= 1.9 = 4.9 = 14.5 E(X) = 0 (.1) + 1 (.3) + 2 (.3) + 3 (.2) + 4 (.1) = 0 + .3 + 1.2 + 1.8 + 1.6 = 4.9 E( X ) = 0 (.1) + 1 (.3) + 2 (.3) + 3 (.2) +4 (.1) 3 3 = 0 + .3 + 2.4 + 5.4 + 6.4 = 14.5

E [g(X)] = g(xi) f(xi) n i = 1 g(X) = g1(X) + g2(X) E [g(X)] = g1(xi) + g2(xi)] f(xi) n i = 1 E [g(X)] = g1(xi) f(xi) +  g2(xi) f(xi) n i = 1 E [g(X)] = E [g1(X)] + E [g2(X)]

Adding and Subtracting Random Variables E(X+Y) = E(X) + E(Y) E(X-Y) = E(X) - E(Y)

E(X+a) = E(X) + a E(bX) = b E(X) Adding a constant to a variable will add a constant to its expected value: E(X+a) = E(X) + a Multiplying by constant will multiply its expected value by that constant: E(bX) = b E(X)

Variance measures dispersion—how “spread out” a probability distribution is. A large (small) variance means a RV is likely to take a wide (narrow) range of values.

Variance var(X) = average squared deviations around the mean of X. var(X) = expected value of the squared deviations around the expected value of X. var(X) = E [(X - E(X)) ] 2

var(X) = E [(X - EX) ] var(X) = E [(X - EX) ] = E [X - 2XEX + (EX) ] = E(X ) - 2 EX EX + E (EX) 2 2 2 = E(X ) - 2 (EX) + (EX) 2 2 = E(X ) - (EX) 2 2 var(X) = E(X ) - (EX)

 var ( X ) = ( xi - EX ) f ( xi ) variance of a discrete random variable, X: n  var ( X ) = ( xi - EX ) 2 f ( xi ) i = 1 standard deviation is square root of variance

calculate the variance for a discrete random variable, X: 2 xi f(xi) (xi - EX) (xi - EX) f(xi) 2 .1 2 - 4.3 = -2.3 5.29 (.1) = .529 3 .3 3 - 4.3 = -1.3 1.69 (.3) = .507 4 .1 4 - 4.3 = - .3 .09 (.1) = .009 5 .2 5 - 4.3 = .7 .49 (.2) = .098 6 .3 6 - 4.3 = 1.7 2.89 (.3) = .867  xi f(xi) = .2 + .9 + .4 + 1.0 + 1.8 = 4.3 (xi - EX) f(xi) = .529 + .507 + .009 + .098 + .867 = 2.01 n i = 1 n 2 i = 1

Z = a + cX var(Z) = var(a + cX) = E [(a+cX) - E(a+cX)] = c var(X) 2 2 2 var(a + cX) = c var(X)

An important aside and a preview of things to come In some sense, a RV’s probability distribution, expected value, and variance are abstract concepts. More precisely, they are population parameters, characteristics of the whole set of possible observations of a RV. As econometricians, our goal is to estimate these parameters (with varying degrees of precision). We do that by computing statistics from a sample of data drawn from the population. The usefulness of econometrics comes from learning about

Covariance cov(X,Y) = E[(X - EX)(Y-EY)] The covariance between two random variables, X and Y, measures the linear association between them. cov(X,Y) = E[(X - EX)(Y-EY)] Note that variance is a special case of covariance. cov(X,X) = var(X) = E[(X - EX) ] 2

cov(X,Y) = E [(X - EX)(Y-EY)] = E [XY - X EY - Y EX + EX EY] = E(XY) - EX EY - EY EX + EX EY = E(XY) - 2 EX EY + EX EY = E(XY) - EX EY cov(X,Y) = E(XY) - EX EY

Y = 1 Y = 2 X = 0 .45 .15 .60 EX=0(.60)+1(.40)=.40 .40 .05 .35 X = 1 covariance .50 .50 cov(X,Y) = E(XY) - EX EY = .75 - (.40)(1.50) = .75 - .60 = .15 EY=1(.50)+2(.50)=1.50 EX EY = (.40)(1.50) = .60 E(XY) = (0)(1)(.45)+(0)(2)(.15)+(1)(1)(.05)+(1)(2)(.35)=.75

Joint pdf A joint probability density function, f(x,y), provides the probabilities associated with the joint occurrence of all of the possible pairs of X and Y.

joint pdf f(x,y) f(0,1) f(0,2) .45 .15 .05 .35 f(1,1) f(1,2) Survey of College City, New Delhi college grads in household joint pdf f(x,y) Y = 1 Y = 2 f(0,1) f(0,2) X = 0 .45 Special homes owned .15 .05 .35 X = 1 f(1,1) f(1,2)

E[g(X,Y)] =   g(xi,yj) f(xi,yj) Calculating the expected value of functions of two random variables. E[g(X,Y)] =   g(xi,yj) f(xi,yj) i j E(XY) =   xi yj f(xi,yj) i j E(XY) = (0)(1)(.45)+(0)(2)(.15)+(1)(1)(.05)+(1)(2)(.35)=.75

Marginal pdf f(xi) =  f(xi,yj) f(yj) =  f(xi,yj) The marginal probability density functions, f(x) and f(y), for discrete random variables, can be obtained by summing over the f(x,y) with respect to the values of Y to obtain f(x) with respect to the values of X to obtain f(y). f(xi) =  f(xi,yj) f(yj) =  f(xi,yj) j i

marginal f(X = 0) .45 .15 .60 f(X = 1) .40 .05 .35 .50 .50 f(Y = 1) pdf for X: f(X = 0) X = 0 .45 .15 .60 f(X = 1) .40 .05 .35 X = 1 marginal pdf for Y: .50 .50 f(Y = 1) f(Y = 2)

Conditional pdf f(x,y) f(x,y) f(x|y) = f(y|x) = f(y) f(x) The conditional probability density functions of X given Y=y , f(x|y), and of Y given X=x , f(y|x), are obtained by dividing f(x,y) by f(y) to get f(x|y) and by f(x) to get f(y|x). f(x,y) f(x,y) f(x|y) = f(y|x) = f(y) f(x)

conditonal Y = 1 Y = 2 f(Y=1|X = 0)=.75 f(Y=2|X= 0)=.25 .75 .25 .45 .15 .60 X = 0 f(X=0|Y=1)=.90 f(X=0|Y=2)=.30 .90 .30 f(X=1|Y=1)=.10 f(X=1|Y=2)=.70 .10 .70 X = 1 .05 .35 .40 .125 .875 f(Y=1|X = 1)=.125 f(Y=2|X = 1)=.875 .50 .50

Independence f(xi,yj) = f(xi) f(yj) X and Y are independent random variables if their joint pdf, f(x,y), is the product of their respective marginal pdfs, f(x) and f(y) . f(xi,yj) = f(xi) f(yj) for independence this must hold for all pairs of i and j

not independent f(X = 0) .45 .15 .60 f(X = 1) .40 .05 .35 .50 .50 Y = 1 Y = 2 marginal pdf for X: .50x.60=.30 .50x.60=.30 f(X = 0) X = 0 .45 .15 .60 f(X = 1) .40 .05 .35 X = 1 .50x.40=.20 .50x.40=.20 The calculations in the boxes show the numbers required to have independence. marginal pdf for Y: .50 .50 f(Y = 1) f(Y = 2)

Correlation cov(X,Y) (X,Y) = var(X) var(Y) The correlation between two random variables X and Y is their covariance divided by the square roots of their respective variances. cov(X,Y) (X,Y) = var(X) var(Y) Correlation is a pure number falling between -1 and 1.

Y = 1 Y = 2 EX=.40 2 2 2 EX=0(.60)+1(.40)=.40 X = 0 .45 .15 .60 2 2 var(X) = E(X ) - (EX) = .40 - (.40) = .24 2 .40 .05 .35 X = 1 cov(X,Y) = .15 correlation .50 .50 EY=1.50 cov(X,Y) 2 2 2 (X,Y) = EY=1(.50)+2(.50) = .50 + 2.0 = 2.50 2 2 var(Y) = E(Y ) - (EY) = 2.50 - (1.50) = .25 var(X) var(Y) 2 (X,Y) = .61

Zero Covariance & Correlation Independent random variables have zero covariance and, therefore, zero correlation. The converse is not true.

E[c1X + c2Y] = c1EX + c2EY E[c1X1+...+ cnXn] = c1EX1+...+ cnEXn Since expectation is a linear operator, it can be applied term by term. The expected value of the weighted sum of random variables is the sum of the expectations of the individual terms. E[c1X + c2Y] = c1EX + c2EY In general, for random variables X1, . . . , Xn : E[c1X1+...+ cnXn] = c1EX1+...+ cnEXn

var(c1X + c2Y)=c1 var(X)+c2 var(Y) + 2c1c2cov(X,Y) The variance of a weighted sum of random variables is the sum of the variances, each times the square of the weight, plus twice the covariances of all the random variables times the products of their weights. Weighted sum of random variables: 2 2 var(c1X + c2Y)=c1 var(X)+c2 var(Y) + 2c1c2cov(X,Y) Weighted difference of random variables: 2 var(c1X  c2Y) = c1 var(X)+c2 var(Y)  2c1c2cov(X,Y) 2

Y ~ N(,2) The Normal Distribution - exp f(y) = y (y - )2  2 2 2 2 (y - )2 - 1 exp f(y) = 2  2 f(y) y 

Z = (y - )/ Z ~ N(,) - The Standardized Normal exp f(z) = z2 2 2  1 exp f(z) = 2 2 

y Y ~ N(,2)  f(y)    a Y -  a -  a -  P [ Y > a ] = P > = P Z >   

y Y ~ N(,2)  f(y)      a b a -  Y -  b -  P [ a < Y < b ] = P < < = P < Z <    a -  b -   

W ~ N[ E(W), var(W) ] W = c1Y1 + c2Y2 + . . . + cnYn Linear combinations of jointly normally distributed random variables are themselves normally distributed. Y1 ~ N(1,12), Y2 ~ N(2,22), . . . , Yn ~ N(n,n2) W = c1Y1 + c2Y2 + . . . + cnYn W ~ N[ E(W), var(W) ]

Chi-Square If Z1, Z2, . . . , Zm denote m independent N(0,1) random variables, and V = Z1 + Z2 + . . . + Zm , then V ~ (m) 2 V is chi-square with m degrees of freedom. If Z1, Z2, . . . , Zm denote m independent N(0,1) random variables, and V = Z1 + Z2 + . . . + Zm , then V ~ (m) 2 V is chi-square with m degrees of freedom. mean: E[V] = E[ (m) ] = m 2 variance: var[V] = var[ (m) ] = 2m 2

Student - t ~ t(m) t = t is student-t with m degrees of freedom. If Z ~ N(0,1) and V ~ (m) and if Z and V are independent then, 2 Z t = ~ t(m) V m t is student-t with m degrees of freedom. mean: E[t] = E[t(m) ] = 0 symmetric about zero variance: var[t] = var[t(m) ] = m/(m-2)

F Statistic ~ F(m1,m2) F = F is an F statistic with m1 numerator If V1 ~ (m1) and V2 ~ (m2) and if V1 and V2 are independent, then 2 2 V1 m1 F = ~ F(m1,m2) V2 m2 F is an F statistic with m1 numerator degrees of freedom and m2 denominator degrees of freedom.