Unit 8: Inference for Proportions. Chapters 8 & 9 in IPS



Similar documents
One-sample test of proportions

Z-TEST / Z-STATISTIC: used to test hypotheses about. µ when the population standard deviation is unknown

Hypothesis testing. Null and alternative hypotheses

1. C. The formula for the confidence interval for a population mean is: x t, which was

Inference on Proportion. Chapter 8 Tests of Statistical Hypotheses. Sampling Distribution of Sample Proportion. Confidence Interval

Exam 3. Instructor: Cynthia Rudin TA: Dimitrios Bisias. November 22, 2011

5: Introduction to Estimation


Case Study. Normal and t Distributions. Density Plot. Normal Distributions

Practice Problems for Test 3

Confidence Intervals for Two Proportions

I. Chi-squared Distributions

Lesson 17 Pearson s Correlation Coefficient

Lesson 15 ANOVA (analysis of variance)

Determining the sample size

Mann-Whitney U 2 Sample Test (a.k.a. Wilcoxon Rank Sum Test)

PSYCHOLOGICAL STATISTICS

Chapter 7: Confidence Interval and Sample Size

Chapter 14 Nonparametric Statistics

Confidence Intervals for One Mean

Confidence Intervals. CI for a population mean (σ is known and n > 30 or the variable is normally distributed in the.

The following example will help us understand The Sampling Distribution of the Mean. C1 C2 C3 C4 C5 50 miles 84 miles 38 miles 120 miles 48 miles

A Test of Normality. 1 n S 2 3. n 1. Now introduce two new statistics. The sample skewness is defined as:

Regression with a Binary Dependent Variable (SW Ch. 11)

University of California, Los Angeles Department of Statistics. Distributions related to the normal distribution

MEI Structured Mathematics. Module Summary Sheets. Statistics 2 (Version B: reference to new book)

Sampling Distribution And Central Limit Theorem

Maximum Likelihood Estimators.

Properties of MLE: consistency, asymptotic normality. Fisher information.

Math C067 Sampling Distributions

Center, Spread, and Shape in Inference: Claims, Caveats, and Insights

Soving Recurrence Relations

Confidence Intervals

OMG! Excessive Texting Tied to Risky Teen Behaviors

Chapter 7 - Sampling Distributions. 1 Introduction. What is statistics? It consist of three major areas:

Measures of Spread and Boxplots Discrete Math, Section 9.4

Normal Distribution.

CHAPTER 7: Central Limit Theorem: CLT for Averages (Means)

Definition. A variable X that takes on values X 1, X 2, X 3,...X k with respective frequencies f 1, f 2, f 3,...f k has mean

THE REGRESSION MODEL IN MATRIX FORM. For simple linear regression, meaning one predictor, the model is. for i = 1, 2, 3,, n

Now here is the important step

Output Analysis (2, Chapters 10 &11 Law)

SECTION 1.5 : SUMMATION NOTATION + WORK WITH SEQUENCES

Methods in Sample Surveys rd Quarter, 2009

STA 2023 Practice Questions Exam 2 Chapter 7- sec 9.2. Case parameter estimator standard error Estimate of standard error

Confidence intervals and hypothesis tests

Overview. Learning Objectives. Point Estimate. Estimation. Estimating the Value of a Parameter Using Confidence Intervals

A probabilistic proof of a binomial identity

1 Correlation and Regression Analysis

, a Wishart distribution with n -1 degrees of freedom and scale matrix.

Statistical inference: example 1. Inferential Statistics

Repeating Decimals are decimal numbers that have number(s) after the decimal point that repeat in a pattern.

1 Computing the Standard Deviation of Sample Means

Incremental calculation of weighted mean and variance

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 13

Non-life insurance mathematics. Nils F. Haavardsson, University of Oslo and DNB Skadeforsikring

In nite Sequences. Dr. Philippe B. Laval Kennesaw State University. October 9, 2008

Week 3 Conditional probabilities, Bayes formula, WEEK 3 page 1 Expected value of a random variable

Chapter 6: Variance, the law of large numbers and the Monte-Carlo method

CS103X: Discrete Structures Homework 4 Solutions

Example 2 Find the square root of 0. The only square root of 0 is 0 (since 0 is not positive or negative, so those choices don t exist here).

TI-83, TI-83 Plus or TI-84 for Non-Business Statistics

Confidence Intervals (2) QMET103

THE TWO-VARIABLE LINEAR REGRESSION MODEL

Chapter 7 Methods of Finding Estimators

3 Energy Non-Flow Energy Equation (NFEE) Internal Energy. MECH 225 Engineering Science 2

Hypergeometric Distributions

3. Greatest Common Divisor - Least Common Multiple

Here are a couple of warnings to my students who may be here to get a copy of what happened on a day that you missed.

5.4 Amortization. Question 1: How do you find the present value of an annuity? Question 2: How is a loan amortized?

Overview of some probability distributions.

Descriptive Statistics

Topic 5: Confidence Intervals (Chapter 9)

GCSE STATISTICS. 4) How to calculate the range: The difference between the biggest number and the smallest number.

Quadrat Sampling in Population Ecology

Lecture 4: Cauchy sequences, Bolzano-Weierstrass, and the Squeeze theorem

Biology 171L Environment and Ecology Lab Lab 2: Descriptive Statistics, Presenting Data and Graphing Relationships

Approximating Area under a curve with rectangles. To find the area under a curve we approximate the area using rectangles and then use limits to find

How To Solve The Homewor Problem Beautifully

S. Tanny MAT 344 Spring be the minimum number of moves required.

CHAPTER 3 THE TIME VALUE OF MONEY

Sequences and Series

Confidence Intervals for Linear Regression Slope

TI-89, TI-92 Plus or Voyage 200 for Non-Business Statistics

SAMPLE QUESTIONS FOR FINAL EXAM. (1) (2) (3) (4) Find the following using the definition of the Riemann integral: (2x + 1)dx

Section 11.3: The Integral Test

Research Method (I) --Knowledge on Sampling (Simple Random Sampling)

A modified Kolmogorov-Smirnov test for normality

Central Limit Theorem and Its Applications to Baseball

Chapter 5: Inner Product Spaces

BINOMIAL EXPANSIONS In this section. Some Examples. Obtaining the Coefficients

Factoring x n 1: cyclotomic and Aurifeuillian polynomials Paul Garrett <garrett@math.umn.edu>

UC Berkeley Department of Electrical Engineering and Computer Science. EE 126: Probablity and Random Processes. Solutions 9 Spring 2006

This document contains a collection of formulas and constants useful for SPC chart construction. It assumes you are already familiar with SPC.

CHAPTER 3 DIGITAL CODING OF SIGNALS

Convexity, Inequalities, and Norms

FIBONACCI NUMBERS: AN APPLICATION OF LINEAR ALGEBRA. 1. Powers of a matrix

Parametric (theoretical) probability distributions. (Wilks, Ch. 4) Discrete distributions: (e.g., yes/no; above normal, normal, below normal)

LECTURE 13: Cross-validation

Transcription:

Uit 8: Iferece for Proortios Chaters 8 & 9 i IPS

Lecture Outlie Iferece for a Proortio (oe samle) Iferece for Two Proortios (two samles) Cotigecy Tables ad the χ test

Iferece for Proortios IPS, Chater 8 Iferece for oulatio roortios () Hyothesis tests Cofidece itervals The aroach here should be familiar by ow: Formulate a roblem i terms of a oulatio arameter Fid a atural estimate of the arameter Stadardize the arameter to (hoefully) a z-score, use tables of the stadard ormal to costruct cofidece itervals, hyothesis tests 3

Is ESP for real? I 934, Rhie ad Zeer ublished a aer which cocluded that extra-sesory-ercetio (ESP) was real They erformed a series of trials i which they had a voluteer guess a card which had a -i-5 chace of beig correct by chace aloe (see cards above). I oe of their exerimets, they foud that the voluteers guessed correctly o 07 of 800 total chaces. Does this suort evidece of ESP? 4

I kow there s ESPN but is there ESP? Defie the radom variables: X = cout of correct guesses out of a fixed ( = 800 here) ˆ = roortio of correct guesses ( ˆ = X/) What would be a aroriate ull hyothesis of o ESP effect? What about the alterative hyothesis? H 0 : = 0 = 0.0 H A : > 0 = 0.0 Should this be a -sided test? Because its tougher to reject ad, ever look at your data before comig u with your hyotheses. So what from the data would be a good measuremet for these hyotheses? ˆ What is the stadard deviatio of this measuremet (if H 0 is true)? More formally ( ) 0( 0) 5

Oe samle z-sigificace test for a oulatio roortio () To test the hyothesis H 0 : = 0 agaist a oe or two-sided alterative, comute the oe-samle z-statistic z ˆ 0 ( Use -values or critical values for the stadard ormal (z) distributio. Why the stadard ormal here istead of a t? Because the stadard error i the deomiator is based o the theoretical distributio of a biomial (if we kow, we automatically get σ ^ ). Its ot a secod estimated quatity from the samle like s is for meas i t-tests. 0 0 ) 6

Solutio to test if there is evidece of ESP: H H 0 A : : 0.0 0.0 0.0(just for fu) ˆ 07 800 0.59 z ˆ 0 ( 0 ) 0.59 0.0 0 0.0( 0.0) 800 value P( z 4.7) 0.000 4.7 Sice our -value < 0.0, we ca reject the ull hyothesis. It looks like there is evidece of ESP voluteers teded to guess the card correctly more ofte tha chace aloe. What factors could be biasig this exerimetal study? 7

Cofidece Itervals for a oulatio roortio () The oe-samle level C (cofidece coefficiet) cofidece iterval for has the form ˆ z * ˆ( ˆ) I these formulas, z* is the critical value from the stadard ormal distributio with area C betwee z* ad z*. Note the slight differece i the stadard error here (comared to the deomiator of the z-test): here we are usig the samle roortio, ˆ, sice there is o ull hyothesis from which to draw a assumed 0 from. 8

Solutio to the 99% cofidece iterval for the true roortio/robability of guessig a card correctly Should this iterval cotai the value 0.0? Why? The calculatio: ˆ z * ˆ( ˆ) 0.59.58 (0.9, 0.99) 0.59(0.74) 800 Note that all these calculatios are doe based o the ormal aroximatio to the biomial. So for either the cofidece iterval ad hyothesis test to be valid, we eed both: 0 ad ( - ) 0 9

Lecture Outlie Iferece for a Proortio (oe-samle) Iferece for Two Proortios (two-samles) Cotigecy Tables ad the χ test 0

Who s more likely to wear glasses: Jae or Joe? Could there be a sex-based, biological basis for eedig corrective eyewear? I the first day survey, the questio was asked: Do you wear corrective eyewear? We foud that 4 out of 6 (53.8%) me wear corrective eyewear, ad foud that 4 out of (66.7%) wome wear corrective eyewear. Is there evidece of a true differece betwee the sexes i the robability of wearig corrective eyewear i the etire oulatio [assumig our class is a radom samle]? Or is this differece we see i the samle just by radom chace?

Jae vs. Joe Defie the radom variables: ˆ M= roortio of me w/ corrective eyewear (w/ a fixed M ) ˆW = roortio of wome w/ corrective eyewear (w/ a fixed W ) What would be a aroriate ull hyothesis of o differece betwee the sexes? What about the alterative hyothesis? H 0 : M - W = 0 H A : M - W 0 So what from the data would be a good measuremet for these hyotheses? ˆ ˆ M W What is the stadard deviatio of this measuremet (if H 0 is true)? M ( M ) W ( W ) ( ) ( ) ( ) M W M W M The above sd holds if we assume the true samle roortios are equal, ad thus the same as some overall (ooled) roortio: More formally W

3 Two samle z-sigificace test for a differece i oulatio roortios To test the hyothesis H 0 : = 0 agaist a oe or two-sided alterative, comute the two-samle z-statistic Where: Use -values or critical values for the stadard ormal (z) distributio to determie your coclusio. Notice the ooled estimator of the combied roortio. Why? Sice the ull hyothesis says they are equal, let s use that fact to get a best estimate of that overall combied 0 ) ˆ ( ˆ ) ( ) ˆ ˆ ( H z ˆ X X

Solutio to test if there is evidece of diff i sexes of corrective eyewear: H H 0 A : : ( ˆ z ˆ ˆ 0.05 ( ) ( ˆ ) H ) (0.538 0.667) 0 0 0 0 ˆ X X 4 4 6 0.5957( 0.5957) 6 8 47 0.5957 0.89 value * P( z 0.89 ) * P( z 0.89) *0.867 0.3734 Sice our -value > 0.05, we caot reject the ull hyothesis. There is ot eough evidece of a differece betwee the sexes i the true roortio of eole i the oulatio that wear corrective eyewear. What factors could be biasig observatioal study? 4

Two-samle Cofidece Iterval for a differece i oulatio roortios The two-samle level-c cofidece iterval for the differece betwee two oulatio roortios ( ) has the form: ( ˆ ˆ ) z * ( ( I these formulas, z* is the critical value from the stadard ormal distributio with area C betwee z* ad z*. ˆ Note the slight differece i the stadard error here (comared to the deomiator of the z-test): here we are usig the two samle roortios searately sice there is o ull hyothesis sayig they are equal so o reaso to ool them. ˆ ) ˆ ˆ 5 )

Solutio to the 95% cofidece iterval for the true differece betwee the sexes Should this iterval cotai the value 0? Why? The calculatio: ( ˆ ˆ ) z * ˆ ( ˆ (0.538 0.667).96* ( 0.406, 0.48) ) ( 0.538( 0.538) 6 Agai, all these calculatios are doe based o the ormal aroximatio to the biomial. So for this (CI ad hyo test) to be valid, we eed for both grous: 0 ad ( ) 0 ˆ ˆ ) 0.667( 0.667) 6

Lecture Outlie Iferece for a Proortio (oe-samle) Iferece for Two Proortios (two-samles) Cotigecy Tables ad the χ test 7

Eyewear-by-sex as a cotigecy table A cotigecy table (show below) is a quick way to rereset how two categorical variables occur together. Its just a table of couts of the umber of observatios that fall i the itersectio of the two variables. For examle, we had 7 observatios that were female (sex == F ) ad did ot wear eyewear (glasses == 0 ).. tabulate glasses sex sex glasses F M Total -----------+----------------------+---------- 0 7 9 4 4 8 -----------+----------------------+---------- Total 6 47 Note: The `ooled estimate of is ˆ = 8/47 = 0.673 8

Eyewear-by-sex as a cotigecy table (Exected values uder H 0 ) I the two roortio test for this data, we were testig the ull hyothesis of H 0 : M = W. What does that mea for the cotigecy table below? What would be the exected cell couts if the roortio of idividuals that use corrective eyewear was costat across the sexes (aka, glasses is uassociated with sex)? If ˆ = 0.5957, the we d exect 0.5957* =.5 of the females to wear corrective eyewear.. tabulate glasses sex, cell Sex glasses F M Total -----------+----------------------+---------- 0 8.49 0.5 9.5 5.49 8 -----------+----------------------+---------- Total 6 47 9

Cotigecy Tables More formally, use the followig formula to comute the exected values: Exected cell cout row total colum total A formal test of the ull hyothesis of o associatio betwee row ad colum variables (both categorical, i this case sex ad eyewear status) is costructed by comarig the observed cell values to their exected values uder H 0. Ay large differeces betwee these would be evidece agaist H 0. This leads to the chi-squared (χ ) test. 0

To test the hyotheses: The Chi-squared test H 0 : rows ad colums are ideedet H A : rows ad colums are deedet We calculate the chi-squared test from the observed ad exected cell couts as such: (observed exected) all cells exected This χ test has degrees of freedom df = (#rows ) x (#cols ). Note: there ca be more tha rows or colums (categories) The -value ca be determied by lookig u i the χ table i the aedix of the textbook Eve though this is a two-sided alterative (do t kow the directio of associatio), we oly use oe-tail of the distributio for the -value (sice we square the umerator)

Corrective Eyewear ad Sex χ test solutio H 0 : Sex ad wearig corrective eyewear are ot associated H A : Sex ad wearig corrective eyewear are associated α = 0.05 all cells (observed exected) exected (7 8.49) ( 0.5) (4.5) 8.49 0.5.5 0.6 0. 0.77 0.43 0.793 (4 5.49) 5.49 This χ statistic has df = ( ) x ( ) =. The -value is the: -value > 0.5. We do ot have eough evidece to reject the ull hyothesis. Wearig corrective eyewear does ot seem to be deedet o sex. 3

Some fial oits The chi-square test for ideedece i a cotigecy table is iheretly a two-sided test, eve though we are usig the area uder the chi-square desity fuctio i the right tail. Whe there are two grous ad two categories, the chi-square test ad the test for differeces i two oulatio roortios coicide: df (z) 0.793 ( 0.89) I order for this χ test to be valid, we eed all the exected cell couts to be 5. 4

Examle with more categories What about: is hair color associated with corrective eyewear?. tabulate hair glasses if hair!= "red" & hair!= "gray", chi glasses hair 0 Total -----------+----------------------+---------- black 6 3 9 blode 5 7 brow 7 8 -----------+----------------------+---------- Total 8 6 44 Pearso chi() = 3.48 Pr = 0.8 5

Take Home Message We have leared the followig classical hyothesis tests (ad related cofidece itervals): Oe-samle t-test for a mea (ad the z-test if σ is kow) Paired t-test for meas Two-samle t-test for meas ooled vs. uooled Oe-samle z-test for a roortio Two-samle z-test for roortios χ test for associatio of two categorical variables Note: I the roortios settigs, the formulas for the stadard errors are a little differet i the cofidece itervals vs. the hyothesis tests. 6

Take Home Message (cot.) The key to all these tests is kowig whe to aly each oe. The differece is if the measuremets are quatitative/cotiuous, you ll be doig rocedures for meas, ad if the measuremets are categorical (success/failure or yes/o or 0/) or the summary statistic is a cout or roortio, you ll be doig rocedures for roortios. If there are more tha two categories (or more tha two grous), you will eed to do the χ test. Make sure you are aware of assumtios for each (like how the t-test goes awry whe is small ad there are outliers, ad the roortio test eeds 0 ad ( ) 0, etc ) But you also have to kee track if there are oe samle or two samles (or more tha two samles) Next slides lays out the framework for all the iferetial rocedures we ve leared so far (ad the oes to come) 7

Road Ma to Iferece i Stat S00 σ kow Iferece for μ (z-based) grou σ ukow (use s) Iferece for μ (t-based) Ideedet grous σ = σ Pooled t-rocedure Quatitative Data grous σ σ No-ooled t-rocedure Paired grous Paired t-rocedure or more grous Regressio w/ Biary Predictors Oe Predictor Simle liear regressio Quatitative redictor(s) + Predictor(s) Multile regressio Start Here! grou Iferece for Biary Data (yes/o) grous Iferece for or more grous χ test for associatio Quatitative redictor(s) Logistic Regressio* Categorical Data (+ categories) or more grous 8 χ test for associatio