A string of not-so-obvious statements about correlation in the data. (This refers to the mechanical calculation of correlation in the data.

Similar documents
We have also learned that, thanks to the Central Limit Theorem and the Law of Large Numbers,

Data Analysis and Statistical Methods Statistics 651

Contents Two Sample t Tests Two Sample t Tests

Chapter 22. Comparing Two Proportions. Copyright 2010 Pearson Education, Inc.

Chapter 22. Comparing Two Proportions. Copyright 2010, 2007, 2004 Pearson Education, Inc.

Statistics for Applications Fall Problem Set 7

Hypothesis tests and confidence intervals

STA Learning Objectives. Population Proportions. Module 10 Comparing Two Proportions. Upon completing this module, you should be able to:

Ma/CS 6a Class 22: Power Series

X. Perturbation Theory

) is a square matrix with the property that for any m n matrix A, the product AI equals A. The identity matrix has a ii

Lecture 19. Curve fitting I. 1 Introduction. 2 Fitting a constant to measured data

Properties and Hypothesis Testing

Dr. Maddah ENMG 617 EM Statistics 11/26/12. Multiple Regression (2) (Chapter 15, Hines)

Stat 200 -Testing Summary Page 1

A PROBABILITY PROBLEM

Recall the study where we estimated the difference between mean systolic blood pressure levels of users of oral contraceptives and non-users, x - y.

Regression, Part I. A) Correlation describes the relationship between two variables, where neither is independent or a predictor.

Name Period ALGEBRA II Chapter 1B and 2A Notes Solving Inequalities and Absolute Value / Numbers and Functions

1 Inferential Methods for Correlation and Regression Analysis

Statistics and Data Analysis in MATLAB Kendrick Kay, February 28, Lecture 4: Model fitting

STATISTICAL PROPERTIES OF LEAST SQUARES ESTIMATORS. Comments:

Sample size calculations. $ available $ per sample

Topic 9: Sampling Distributions of Estimators

ECE 901 Lecture 4: Estimation of Lipschitz smooth functions

Mathematical Notation Math Introduction to Applied Statistics

Resampling Methods. X (1/2), i.e., Pr (X i m) = 1/2. We order the data: X (1) X (2) X (n). Define the sample median: ( n.

TABLES AND FORMULAS FOR MOORE Basic Practice of Statistics

Overview. p 2. Chapter 9. Pooled Estimate of. q = 1 p. Notation for Two Proportions. Inferences about Two Proportions. Assumptions

Comparing your lab results with the others by one-way ANOVA

Statistics 20: Final Exam Solutions Summer Session 2007

This is an introductory course in Analysis of Variance and Design of Experiments.

AVERAGE MARKS SCALING

A quick activity - Central Limit Theorem and Proportions. Lecture 21: Testing Proportions. Results from the GSS. Statistics and the General Population

ST 305: Exam 3 ( ) = P(A)P(B A) ( ) = P(A) + P(B) ( ) = 1 P( A) ( ) = P(A) P(B) σ X 2 = σ a+bx. σ ˆp. σ X +Y. σ X Y. σ X. σ Y. σ n.

The Binomial Multi-Section Transformer

Summer MA Lesson 13 Section 1.6, Section 1.7 (part 1)

Comparing Two Populations. Topic 15 - Two Sample Inference I. Comparing Two Means. Comparing Two Pop Means. Background Reading

Linear Regression Demystified

Power and Type II Error

Lecture 2: Monte Carlo Simulation

3/3/2014. CDS M Phil Econometrics. Types of Relationships. Types of Relationships. Types of Relationships. Vijayamohanan Pillai N.

Efficient GMM LECTURE 12 GMM II

The Binomial Multi- Section Transformer

Lecture 9: Independent Groups & Repeated Measures t-test

Binomial transform of products

Topic 9: Sampling Distributions of Estimators

5.6 Binomial Multi-section Matching Transformer

Chapter 23: Inferences About Means

Integrals of Functions of Several Variables

Lecture 6 Chi Square Distribution (χ 2 ) and Least Squares Fitting

TMA4245 Statistics. Corrected 30 May and 4 June Norwegian University of Science and Technology Department of Mathematical Sciences.

Bernoulli Polynomials Talks given at LSBU, October and November 2015 Tony Forbes

STAT-UB.0103 NOTES for Wednesday 2012.APR.25. Here s a rehash on the p-value notion:

Correlation Regression

Discrete Mathematics for CS Spring 2007 Luca Trevisan Lecture 22

A sequence of numbers is a function whose domain is the positive integers. We can see that the sequence

Topic 9: Sampling Distributions of Estimators

Lecture 6 Chi Square Distribution (χ 2 ) and Least Squares Fitting

Chapter 5: Hypothesis testing

Bertrand s postulate Chapter 2

6.3 Testing Series With Positive Terms

Algebra of Least Squares

Chapter 8: Estimating with Confidence

Understanding Samples

If, for instance, we were required to test whether the population mean μ could be equal to a certain value μ

Goodness-of-Fit Tests and Categorical Data Analysis (Devore Chapter Fourteen)

(all terms are scalars).the minimization is clearer in sum notation:

Summary: Congruences. j=1. 1 Here we use the Mathematica syntax for the function. In Maple worksheets, the function

10. Comparative Tests among Spatial Regression Models. Here we revisit the example in Section 8.1 of estimating the mean of a normal random

11 Correlation and Regression

Data Analysis and Statistical Methods Statistics 651

CS 70 Second Midterm 7 April NAME (1 pt): SID (1 pt): TA (1 pt): Name of Neighbor to your left (1 pt): Name of Neighbor to your right (1 pt):

19.1 The dictionary problem

ENGI 4421 Confidence Intervals (Two Samples) Page 12-01

Stat 139 Homework 7 Solutions, Fall 2015

Because it tests for differences between multiple pairs of means in one test, it is called an omnibus test.

1 Constructing and Interpreting a Confidence Interval

Notes on Hypothesis Testing, Type I and Type II Errors

FUZZY RELIABILITY ANALYSIS OF COMPOUND SYSTEM BASED ON WEIBULL DISTRIBUTION

GG313 GEOLOGICAL DATA ANALYSIS

MidtermII Review. Sta Fall Office Hours Wednesday 12:30-2:30pm Watch linear regression videos before lab on Thursday

S Y Y = ΣY 2 n. Using the above expressions, the correlation coefficient is. r = SXX S Y Y

Chapter 12 Correlation

t distribution [34] : used to test a mean against an hypothesized value (H 0 : µ = µ 0 ) or the difference

Define a Markov chain on {1,..., 6} with transition probability matrix P =

Output Analysis (2, Chapters 10 &11 Law)

5.6 Binomial Multi-section Matching Transformer

Section 9.2. Tests About a Population Proportion 12/17/2014. Carrying Out a Significance Test H A N T. Parameters & Hypothesis

6 Sample Size Calculations

October 25, 2018 BIM 105 Probability and Statistics for Biomedical Engineers 1

CONFIDENCE INTERVALS STUDY GUIDE

Chapter 22: What is a Test of Significance?

Sequences A sequence of numbers is a function whose domain is the positive integers. We can see that the sequence

Chapter 18: Sampling Distribution Models

distinct distinct n k n k n! n n k k n 1 if k n, identical identical p j (k) p 0 if k > n n (k)

Binomial Distribution

Table 12.1: Contingency table. Feature b. 1 N 11 N 12 N 1b 2 N 21 N 22 N 2b. ... a N a1 N a2 N ab

Lektion 4. Sources of variation. Attribute Chapter 6 Attribute control

ACCESS TO SCIENCE, ENGINEERING AND AGRICULTURE: MATHEMATICS 1 MATH00030 SEMESTER / Statistics

Transcription:

STAT-UB.003 NOTES for Wedesday 0.MAY.0 We will use the file JulieApartet.tw. We ll give the regressio of Price o SqFt, show residual versus fitted plot, save residuals ad fitted. Give plot of (Resid, Price, that s residuals versus observed. Strog patter! What does this ea? The proble is that this always happes. We just do t thik about it, ad whe it pops up, we see puzzled. Here s a quick ru through the forulas. Y i β 0 + β x i + ε i Y ˆi b 0 + b x i e i Y i Y ˆi A strig of ot-so-obvious stateets about correlatio i the data. (This refers to the echaical calculatio of correlatio i the data.. Corr( e i, Y ˆi 0 Of course. There is o et slope o the residual versus fitted plot.. Corr( Y i, x i Corr( Y ˆi, x i Of course. Oce you ve coputed b 0 ad b as ubers, the Ŷ is a siple liear fuctio of x. This equal correlatio will ot happe for ultiple regressio. 3. Corr( e i, x i 0 This is a cosequece of the coputatio. I a ultiple regressio, this will happe for each idepedet variable. 4. Corr( e i, Y i > 0 Yes, the residuals are positively correlated with the depedet variable. Here s soe ituitio. With ot too sall, it will happe that Y ˆi β 0 + β x i. The e i Y i ˆi Y ε i. Thus Y i β 0 + β x i + ε i β 0 + β x i + e i (o-rado + e i. This will happe eve with sall, ad this ca be foralized with a real proof.

As a prelude to what s goig to happe ext, we have a siple distributioal result. Suppose that Z is a stadard oral rado variable. Defie a ew rado variable as H Z. This H is always positive. Its distributio is called the chi-squared with oe degree of freedo. I fact, you will usually fid that it s writte χ. The superscript ( is the square part, ad the subscript is the degrees of freedo idetified. I geeral, if Z, Z,, Z k are idepedet stadard oral rado variables, the the distributio of Z + Z +... + Zk is the chi-squared distributio with k degrees of freedo. There are tables of the distributio, but we will be usig oly the oe degree of freedo versio. We let ( α χ upper α poit for the chi-squared distributio with oe degree of freedo. The ost cooly used value is ( 0.05 3.84. χ 3.84. Note that.96 3.846 Here s aother coo situatio. Suppose that you have two idepedet bioial rado variables, X ad Y, correspodig to groups idetified as ad. Cotexts will of course chage. Soeties the groups with be idetified as A ad B, soeties as X ad Y, soeties as Coke ad Pepsi. Clerical vigilace is critical! (Clerical vigilace is always critical. Let s say that X ~ Bi(, p ad Y ~ Bi(, p. The ~ here is read is distributed as. We wat to test H 0 : p p versus alterative H : p p. This siple little proble ca be put ito this two-by-two display: Group Successes Failures Total X X Y Y There are ay, ay statistical tests that have bee proposed for this. The ost coo oe operates with the assuptio that the saple sizes ad are large eough to allow oral approxiatios for each of the two bioials. I what follows, there will be a lot of algebra. It s ot very difficult, but it is quite aoyig. You ca certaily read through quickly to see what s goig o. Sice we eed to set α P[Type I error H 0 ] uder the ull hypothesis H 0, let s assue for ow that p p ad (for ow let s just use the coo sybol p.

Just to be ephatic: the assuptio that p p is doe oly to derive the test ad to cotrol the type I error probability at α. NOTE: If there is a coo value of p, the X + Y would be bioial with + trials ad success probability p. However, if we just copute X + Y, the we would have o iforatio about the possibility that H 0 would be wrog. X Ituitively, we ll have to base a statistic o either X Y or ad the Y derive its distributio uder H 0. I settig up the test statistics, assue hypothetically that H 0 is true. It would see that X is approxiately oral with ea p ad with stadard deviatio p ( Idepedetly, the distributio of Y is approxiately oral with ea p ad with stadard deviatio p (. It follows the that with ea 0 ad with stadard deviatio p ( is approxiately oral. Where did that coe fro? The thig that cobies clealy is the variace, the square of the stadard deviatio. We use these steps:. X Var Y Var p p ( ( X Y Var Var + Var p ( p ( + X Y Var + Var p ( { + } 3

SD ( p p + We have a plausible estiate of p whe H 0 is true. This is p X + Y. It follows the + that we have a estiate of SD. This estiate will be called the stadard error (SE ad it is SE ( +. We ca ake a approxiately oral statistic through. If the SE ( + ull hypothesis is true, this follows closely the oral distributio with ea 0 ad with stadard deviatio. The covetioal rule is that we ll reject H 0 at the 5% level if this is either -.96 or.96. More siply, we reject H 0 if the square of this exceeds 3.84. (Note that 3.84.96. At this poit, it helps to overlay additioal otatio: Group Successes Failures Total X A - X B A+B Y C - Y D C+D Total A+C B+D N A+B+C+D It ca ow be show that the square of this, aely N ( AD BC ( A + B( C + D( A + C( B + D. (, is equal to NOTE: A slightly differet derivatio will produce this test statistic as. The two fors are uerically very close ( ( + 4

whe H 0 is true (ad are usually very close eve whe H 0 is ot true. I ay case, the operatios of the hypothesis test deped priarily o how the test statistic behaves whe H 0 is true. Thus, either for will work. Betwee the *** lies is this derivatio. It s ot critical to read this, but it s good to have it here. ***************************************************************** The ite uder the square root sig, eaig ( +, ca be rearraged: X + Y X + Y + + + ( ( + X Y + + [] Ite [] is ow B + D + N A B C D ( A C ( + ( + The uerator ca be revised as well: ( + ( + ( + ( + A C B D N A B C D X Y A C A + B C + D ( + ( + ( A + B( C + D A C D C A B AD BC ( A + B ( C + D Recall that our test statistic was ( + iterested i its square. That squared statistic is, ad that we were ( ( 5

AD BC N A B C D ( A + B( C + D ( A + C( B + D ( + ( + N ( AD BC ( A + B( C + D( A + C( B + D ***************************************************************** I this for N ( AD BC ( A + B( C + D( A + C( B + D, it s ot eve too hard to reeber. The uerator has the deteriat of the two-by-two table (thought of as a atrix, ad the deoiator is the product of the four totals aroud the argi of the table. This is well kow; it s the chi-squared test for the two-by-two table of couts, ad it s usually idetified as χ. (Soeties this sybol is writte χ, to ephasize that it has oe degree of freedo. The procedure, at level α, is to reject H 0 if χ ( α χ upper α poit for the chi-squared distributio with oe degrees of freedo. The ost cooly used value is ( 0.05 χ 3.84. Note that.96 3.846 3.84. There are tables of the chi-squared distributio, but for this two-by-two table situatio, we are usig the 3.84 value early all the tie. More coplicated uses of the chi-squared distributio are doe with software, ad the software geerally provides the p-value. Here s a quick exaple. Suppose that you get these values: Cure No cure Total Product A 8 6 44 Product B 40 8 58 Total 68 34 0 The hypothesis uder test is H 0 : p A p B, that the two products have equal cure rates. The test statistic is 6

χ 0 ( 8 8 6 40 44 58 68 34 0.397 The cutoff poit is 3.84. We are owhere close to statistical sigificace. We d have to coclude that the two products are ot sigificatly differet. This is t surprisig, sice the product success rates were p ˆ A 8 44 64% ad p ˆ B 40 58 69%. Now let s suppose that we have two possible edicatios for stoach ache. We have two groups of subjects; 45 of the get edicatio H ad 4 of the get edicatio M. The data o relief are these: Success Fail Total Medicatio H 36 9 45 Medicatio M 0 4 Total 58 9 87 Is there a sigificat differece betwee the products? Well. we re testig H 0 : p H p M agaist H : p H p M. Let s agree to use the 0.05 level of sigificace. The test statistic is χ, ad we ll reject H 0 if χ 3.84. Fid χ 87 ( 36 0 9 45 4 58 9 5 87 7.457 45 4 58 9 This differece would be judged statistically sigificat. You ight observe that p ˆ H 36 45 0.80 ad p ˆ M 0.538. These are separated clealy. 4 7