Homework assignment
This presentation is the property of its rightful owner.
Sponsored Links
1 / 66

Homework Assignment PowerPoint PPT Presentation


  • 71 Views
  • Uploaded on
  • Presentation posted in: General

Homework Assignment. 10.17, 10.19, 10.23, 10.29, 10.32 Due in Class Dec 1. Last Time: Finished Contingency Tables Reviewed Basics on Linear Regression. Suppose I sample n many people:. How many observations do I expect to get in cell (i,j)?

Download Presentation

Homework Assignment

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Homework assignment

Homework Assignment

10.17, 10.19, 10.23, 10.29, 10.32

Due in Class Dec 1


Last time finished contingency tables reviewed basics on linear regression

Last Time:Finished Contingency TablesReviewed Basics on Linear Regression


Suppose i sample n many people

Suppose I sample n many people:

  • How many observations do I expect to get in cell (i,j)?

  • If the Null Hypothesis holds, i.e., if the columns and rows are independent, then I expect the number of observations in cell (i,j) to be

How to compare??

Both are unknown!


Suppose i sample n many people1

Suppose I sample n many people:

How to compare??

Both are unknown!


Suppose i sample n many people2

Suppose I sample n many people:


Finding a p value for a chi square statistic one tailed

Finding a p-value for a Chi-Square Statistic (one-tailed)

Table F (T-20)


Homework assignment

Example: Development in 1st grade


Homework assignment

Example: Development in 1st grade


Homework assignment

FIXED


Slight change of notation

Slight Change of Notation

Homogeneity of

parallel samples


Example

Example

255

32

FIXED

Equivalent Equations


More generally

More Generally:

The rest is the same as in previous scenario,

i.e., we get the same Chi-square again.


Special case 2x2 tables

Special Case: 2x2 Tables


Homework assignment

The Square of a Standard Normal Random Variableis a Chi-Square Random Variablewith 1 degree of freedom.


Homework assignment

Today:From descriptive to inference statistics…Estimation and Hypothesis Testingfor Linear Regression


Statistical inference for a single variable

Statistical Inference (for a single variable)

Estimation: (Confidence Intervals)

Point

estimate

critical

value

Std. dev. of

point estimate

±

·

For instance: Confidence Interval for the mean:

±

·


Statistical inference for a single variable1

Statistical Inference (for a single variable)

Hypothesis Testing:


Example 20 kindergarteners

Example 20 kindergarteners

1pt

2pts

3pts

“Popularity Score” = Average Score


Example 20 kindergarteners1

Example 20 kindergarteners

“Social Competence Score”


Example 20 kindergarteners2

Example 20 kindergarteners

“Popularity Score”

“Social Competence Score”


Statistical inference for two variables

Statistical Inference (for two variables)

Example:

Children X: Popularity,

Y: Social competence

Goal: Explain (linear) relationship between X and Y


Statistical inference for two variables1

Statistical Inference (for two variables)


Homework assignment

Y

1

X


Simple linear regression

Simple (linear) regression

Explain the (linear) relationship (if it exists)

between random variable X and random variable Y.


Homework assignment

Four assumptions

about the error term

4

For different

values of X,

the error terms

are uncorrelated

1

3

2

The error term

is a normally

distributed

random variable

No matter what

value X takes,

the error has

a mean of zero


First assumption error has a normal distribution

First Assumption:Error has a Normal Distribution

Error


Homework assignment

Second assumption: Average error is zero for each value of X

1

X


Homework assignment

3rd assumption: Error has same standard deviation for each value of X

Y

Error

X


Homework assignment

Y

X


Homework assignment

Y

X


Homework assignment

We will sample data to estimate the parameters.

This leads to point estimates, confidence intervals

and hypothesis testing for each parameter,

in addition to a general test of the model as a whole.


Estimation of intercept and slope just a change of notation

Estimation of Intercept and Slope:(just a change of notation)


Estimated regression line

Estimated Regression Line


Parameter estimates

Parameter Estimates:

Degrees of freedom

loose 1 df for X

loose 1 df for Y


Recall point estimates sample statistics are random variables

Recall: Point Estimates (Sample Statistics) are Random Variables


Recall point estimates sample statistics are random variables1

Recall: Point Estimates (Sample Statistics) are Random Variables

Sampling Distributions


Recall point estimates sample statistics are random variables2

Recall: Point Estimates (Sample Statistics) are Random Variables

Don’t

Know!

Hypothesis Testing


Homework assignment

Remember the general rule for Confidence Intervals:

Point

estimate

critical

value

Std. dev. of

point estimate

±

·


Confidence intervals for intercept and slope

Confidence Intervals for Intercept and Slope

Point

estimate

critical

value

Std. dev. of

point estimate

±

·


95 confidence intervals for intercept and slope

95% Confidence Intervals for Intercept and Slope


95 confidence intervals for intercept and slope1

95% Confidence Intervals for Intercept and Slope


Homework assignment

Hypothesis Test on Slope

If p-value of the standardized statistic <  then reject H0

and conclude that there is indeed a linear relationship


Homework assignment

Hypothesis Test on Slope


Computer output note different programs differ in style and content

Computer Output(Note: Different programs differ in style and content!)

p-value

< .001


Analysis of variance for regression

Analysis of Variancefor Regression

How much

y differs

from mean

How much

predicted y

differs

from mean

residual

/

error

Involves

only data


Analysis of variance for regression1

Analysis of Variance for Regression


Analysis of variance for regression2

Analysis of Variance for Regression

Sum Squares

Total

(SST)

Sum Squares

Error

(SSE)

Sum Squares

Model

(SSM)

Variability

in the

Data

Variability

unaccounted

for

Variability

accounted for

by the Model

Degrees of Freedom

DFT = n-1

Degrees of Freedom

DFE=n-2

Degrees of Freedom

DFM = 1

=

+


Analysis of variance for regression3

Analysis of Variance for Regression

Degrees of Freedom

DFT = n-1

Degrees of Freedom

DFE=n-2

Degrees of Freedom

DFM = 1

Mean Squares

Total

(MST)

Mean Squares

Error

(MSE)

Mean Squares

Model

(MSM)


Analysis of variance for regression4

Analysis of Variance for Regression

Mean Squares

Error

(MSE)


Analysis of variance table

Analysis of Variance Table


Hypothesis testing and the anova table

Hypothesis Testingand the ANOVA Table

Mean Squares

Error

(MSE)

It can be shown that

the Null Hypothesis

implies that

MSM is also an unbiased

estimator of


Analysis of variance table1

Analysis of Variance Table

Table E

df in the numerator

df in the denominator


Analysis of variance table2

Analysis of Variance Table

p

p-value here: <.001


Homework assignment

Note


Homework assignment

The Square of a t Random Variable with n-2 degrees of freedomis an F Random Variablewith 1 degree of freedom in the numerator andwith n-2 degrees of freedom in thedenominator.


Slight shift of perspective

Slight shift of perspective

  • Treated the X variable as if it were fixed.

  • Now, let’s think of X and Y as both being random variables (jointly distributed).

  • Let’s assume they are both normally distributed (i.e. they are “jointly normal”)

  • We can define a population correlation ρ

  • We can use the sample correlation r as an estimate of ρ.


Is there a linear relationship between random variables x and y

Is there a linear relationship between random variables X and Y?

Hypothesis Test about Correlation

Question: Can we / can we not draw a line close to the data?

Answer: No, unless we provide sufficient evidence that we can.


Homework assignment

loose 1 df for X

loose 1 df for Y

If p-value of the standardized statistic <  then reject H0

and conclude that there is indeed a linear relationship


Homework assignment

In our Example:


Hmmmm last time this time

Hmmmm…Last Time…This Time…


One more thing

One more thing…

Percent of Variance

explained by the model


  • Login