The Normal Distribution; the GLM with the Normal Distribution

The Normal Distribution; the GLM with the Normal Distribution

A Primer on Mathematical Statistics and Univariate Distributions; The Normal Distribution; The GLM with the Normal Distribution PSYC 943 (930): Fundamentals of Multivariate Modeling Lecture 4: September 5, 2012 PSYC 943: Lecture 4 Today’s Class • The building blocks: The basics of mathematical statistics: Random variables: definitions and types Univariate distributions General terminology Univariate normal (aka, Gaussian) Other popular (continuous) univariate distributions Types of distributions: marginal, conditional, and joint Expected values: means, variances, and the algebra of expectations Linear combinations of random variables • The finished product: How the GLM fits within statistics The GLM with the normal distribution The statistical assumptions of the GLM How to assess these assumptions PSYC 943: Lecture 4 2 RANDOM VARIABLES AND STATISTICAL DISTRIBUTIONS PSYC 943: Lecture 4 3 Random Variables Random: situations in which the certainty of the outcome is unknown and is at least in part due to chance + Variable: a value that may change given the scope of a given problem or set of operations = Random Variable: a variable whose outcome depends on chance (possible values might represent the possible outcomes of a yet-to-be- performed experiment) Today we will denote a random variable with a lower-cased: 푥 PSYC 943: Lecture 4 4 Types of Random Variables • Random variables have different types: 1. Continuous Examples of continuous random variables: represents the height of a person, drawn at random (the outcome/DV in a GLM) 푥 푌푝 2. Discrete (also called categorical, generally) Example of discrete: represents the gender of a person, drawn at random 푥 3. Mixture of Continuous and Discrete: Example of mixture: response time (if between 0 and 45 seconds) represents 0 푥 � PSYC 943: Lecture 4 5 Key Features of Random Variables • Random variables each are described by a probability density/mass function (PDF) ( ) that indicates relative frequency of occurrence A PDF is a mathematical function that gives a rough picture of the distribution from푓 푥 which a random variable is drawn • The type of random variable dictates the name and nature of these functions: Continuous random variables: ( ) is called a probability density function Area under curve must equal 1 (found by calculus – integration) 푓 푥 Height of curve (the function value ): – Can be any positive number – Reflects relative likelihood of an observation푓 푥 occurring Discrete random variables: ( ) is called a probability mass function Sum across all values must equal 1 푓 푥 The function value ( ) is a probability (so must range from 0 to 1) PSYC 943: Lecture 4 6 푓 푥 Other Key Terms • The sample space is the set of all values that a random variable can take: The sample space for a random variable from a normal distribution 푥 ( , ) is , (all real numbers) 2 푥 푥 ∼ 푁 휇푥 휎푥 −∞ ∞ The sample space for a random variable representing the outcome of a coin flip is , 푥 퐻 푇 The sample space for a random variable representing the outcome of a roll of a die is {1, 2, 3, 4, 5, 6} 푥 • When using generalized models (discussed next week), the trick is to pick a distribution with a sample space that matches the range of values obtainable by data PSYC 943: Lecture 4 7 Uses of Distributions in Data Analysis • Statistical models make distributional assumptions on various parameters and/or parts of data • These assumptions govern: How models are estimated How inferences are made How missing data may be imputed • If data do not follow an assumed distribution, inferences may be inaccurate Sometimes a very big problem, other times not so much • Therefore, it can be helpful to check distributional assumptions prior to (or while) running statistical analyses We will do this at the end of class PSYC 943: Lecture 4 8 CONTINUOUS UNIVARIATE DISTRIBUTIONS PSYC 943: Lecture 4 9 Continuous Univariate Distributions • To demonstrate how continuous distributions work and look, we will discuss three: Uniform distribution Normal distribution Chi-square distribution • Each are described a set of parameters, which we will later see are what give us our inferences when we analyze data • What we then do is put constraints on those parameters based on hypothesized effects in data PSYC 943: Lecture 4 10 Uniform Distribution • The uniform distribution is shown to help set up how continuous distributions work • For a continuous random variable that ranges from , , the uniform probability density function is: 푥 1 푎 푏 = 푓 푥 푏 − 푎 • The uniform distribution has two parameters: – the lower limit – the upper limit 푎 푏 • , PSYC 943:푥 Lecture∼ 푈 4 푎 푏 11 More on the Uniform Distribution • To demonstrate how PDFs work, we will try a few values: ( ) .5 0 1 1 풙 풂 풃 풇 풙= 1 1 0 .75 0 1 1 − = 1 1 0 15 0 20 1 = .05 20 −0 15 10 20 1 − = .1 20 10 • The uniform PDF has the feature that all values of− are equally likely across the sample space of the distribution Therefore, you do not see in the PDF 푥 푥 푓 푥 • The mean of the uniform distribution is ( + ) 1 • The variance of the uniform distribution2 is 푎 푏 1 2 PSYC 943: Lecture 4 12 12 푏 − 푎 Univariate Normal Distribution • For a continuous random variable (ranging from to ) the univariate normal distribution function is: 1 푥 −∞ ∞ = exp 2 2 푥 − 휇푥 푓 푥 2 − 2 푥 휎푥 • The shape of the distribution2휋 is휎 governed by two parameters: The mean The variance 푥 These parameters휇 2 are called sufficient statistics (they contain all the information about휎푥 the distribution) • The skewness (lean) and kurtosis (peakedness) are fixed • Standard notation for normal distributions is ( , ) Read as: “ follows a normal distribution with a mean and2 a variance ” 푥 ∼ 푁 휇푥 휎푥 2 푥 휇푥 휎푥 • Linear combinations of random variables following normal distributions result in a random variable that is normally distributed You’ll see this later with respect to the GLM… PSYC 943: Lecture 4 13 Univariate Normal Distribution ) 푥 ( 푓 gives the height of the curve (relative frequency) for any value of , , and 2 푓 푥 푥 휇푥 휎푥 PSYC 943: Lecture 4 14 More of the Univariate Normal Distribution • To demonstrate how the normal distribution works, we will try a few values: ( ) .5 0 1ퟐ 0.352 풙 흁풙 흈풙 풇 풙 .75 0 1 0.301 .5 0 5 0.079 .75 -2 1 0.009 -2 -2 1 0.399 • The values from were obtained by using Excel The “=normdist()” function Most statistics푓 packages푥 have a normal distribution function • The mean of the normal distribution is • The variance of the normal distribution is 휇푥 PSYC 943: Lecture 4 2 15 푥 휎 Chi-Square Distribution • Another frequently used univariate distribution is the Chi-Square distribution Sampling distribution of the variance follows a chi-square distribution Likelihood ratios follow a chi-square distribution • For a continuous random variable (ranging from 0 to ), the chi-square distribution is given by: 1 푥 ∞ = exp 휈 2 2 −1 2 2 푥 푓 푥 휈 푥 − 2 휈 • is called the gamma functionΓ • The chi-square distribution is governed by one parameter: (theΓ ∙ degrees of freedom) The mean is equal to ; the variance is equal to 휈 휈 2휈 PSYC 943: Lecture 4 16 (Univariate) Chi-Square Distribution ( ) 푓 푥 푥 PSYC 943: Lecture 4 17 MARGINAL, JOINT, AND CONDITIONAL DISTRIBUTIONS PSYC 943: Lecture 4 18 Moving from One to Multiple Random Variables • When more than one random variable is present, there are several different types of statistical distributions: • We will first consider two discrete random variables: is the outcome of the flip of a penny ( , ) = = .5 ; = = .5 푝 푝 푥 퐻, 푇 is the outcome푝 of the flip of푝 a dime 푓 푥 = 퐻 = .5 ; 푓 푥= 푇 = .5 푧 퐻푑 푇푑 푓 푧 퐻푑 푓 푧 푇푑 • We will consider the following distributions: Marginal distribution The distribution of one variable only (either ( ) or ( )) Joint distribution 푓 푥 푓 푧 ( , ): the distribution of both variables (both and ) Conditional푓 푥 푧 distribution 푥 푧 The distribution of one variable, conditional on values of the other: – : the distribution of given – : the distribution of given 푓 푥 푧 푥 푧 푓 푧 푥 푧 푥 PSYC 943: Lecture 4 19 Marginal Distributions • Marginal distributions are what we have worked with exclusively up to this point: they represent the distribution of one variable by itself Continuous univariate distributions: Uniform Normal Chi-square Categorical distributions in our example: The flip of a penny The flip of a dime ( ) 푓 푥 푓 푧 PSYC 943: Lecture 4 20 Joint Distributions • Joint distributions describe the distribution of more than one variable, simultaneously Representations of multiple variables collected • Commonly, the joint distribution function is denoted with all random variables separated by commas In our example, , is the joint distribution of the outcome of flipping both a penny and a dime As both are discrete,푓 푥 푧 the joint distribution has four possible values: = , = , = , = , = , = , = , = 푝 푑 푝 푑 푝 푑 푝 푑 푓 푥 퐻 푧 퐻 푓 푥 퐻 푧 푇 푓 푥 푇 푧 퐻 푓 푥 푇 푧 푇 • Joint distributions are multivariate distributions We will cover the continuous versions of these in a few weeks The multivariate normal distribution For our purposes, we will use joint distributions to introduce two topics Joint distributions of independent variables Joint likelihoods (next class) – used in maximum likelihood estimation PSYC 943: Lecture 4 21 Joint Distributions of Independent Random Variables • Random variables are said to be independent if the occurrence of one event makes it neither more nor less probable of another event For joint distributions, this means: , = 푓 푥 푧 푓 푥 푓 푧 • In our example, flipping a penny and flipping

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    54 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