Hypothesis Testing Niniet Indah Arvitrida, ST, MT SepuluhNopember Institute of Technology INDONESIA 2008.

Slides:



Advertisements
Presentasi serupa
Pengujian Hipotesis.
Advertisements

Pendugaan Parameter.
Topik 8 Pengujian Hipotesis (Hypothesis Testing)
MENENTUKAN UKURAN SAMPEL
BUDIYONO Program Pascasarjana UNS
Korelasi Linier KUSWANTO Korelasi Keeratan hubungan antara 2 variabel yang saling bebas Walaupun dilambangkan dengan X dan Y namun keduanya diasumsikan.
Varable Control Chart Individual, Cumulative Sum, Moving-Average, Geometric Moving-Average, Trend, Modified, Acceptance.
Pertemuan 02 Ukuran Numerik Deskriptif
BLACK BOX TESTING.
Presented By : Group 2. A solution of an equation in two variables of the form. Ax + By = C and Ax + By + C = 0 A and B are not both zero, is an ordered.
© 2002 Prentice-Hall, Inc.Chap 1-1 Bab 1 Pendahuluan.
Pertemuan 05 Sebaran Peubah Acak Diskrit
Ruang Contoh dan Peluang Pertemuan 05
Pendugaan Parameter Proporsi dan Varians (Ragam) Pertemuan 14 Matakuliah: L0104 / Statistika Psikologi Tahun : 2008.
Sampling Methods Beberapa istilah
Population and sample. Population is complete actual/theoretical collection of numerical values (scores) that are of interest to the researcher. Simbol.
Masalah Transportasi II (Transportation Problem II)
Pertemuan 03 Ukuran Penyimpangan (Variasi)
PENDUGAAN PARAMETER Pertemuan 7
1 Pertemuan 22 Analisis Studi Kasus 2 Matakuliah: H0204/ Rekayasa Sistem Komputer Tahun: 2005 Versi: v0 / Revisi 1.
Uji Goodness of Fit : Distribusi Multinomial
Pertemuan 07 Peluang Beberapa Sebaran Khusus Peubah Acak Kontinu
HAMPIRAN NUMERIK SOLUSI PERSAMAAN NIRLANJAR Pertemuan 3
MULTIPLE REGRESSION ANALYSIS THE THREE VARIABLE MODEL: NOTATION AND ASSUMPTION 08/06/2015Ika Barokah S.
1 HAMPIRAN NUMERIK SOLUSI PERSAMAAN LANJAR Pertemuan 5 Matakuliah: K0342 / Metode Numerik I Tahun: 2006 TIK:Mahasiswa dapat meghitung nilai hampiran numerik.
1 Pertemuan #3 Probability Distribution Matakuliah: H0332/Simulasi dan Permodelan Tahun: 2005 Versi: 1/1.
1 Pertemuan 11 Function dari System Matakuliah: M0446/Analisa dan Perancangan Sistem Informasi Tahun: 2005 Versi: 0/0.
9.3 Geometric Sequences and Series. Objective To find specified terms and the common ratio in a geometric sequence. To find the partial sum of a geometric.
Chapter 10 – The Design of Feedback Control Systems PID Compensation Networks.
Chapter 5 Discrete Random Variables and Probability Distributions Statistika.
STATISTICAL INFERENCE PART VI HYPOTHESIS TESTING 1.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.. Chap 11-1 Chapter 11 Analysis of Variance Basic Business Statistics 10 th Edition.
Ukuran Penyimpangan atau Disversi Pertemuan 04
Jartel, Sukiswo Sukiswo
PROBABILITY DISTRIBUTION
DISTRIBUSI BINOMIAL.
STATISTIKA CHATPER 4 (Perhitungan Dispersi (Sebaran))
Statistik TP A Pengujian Hipotesis Satu Populasi (Mean dan Proporsi)
Uji Goodness of Fit : Distribusi Multinomial
Teori Sampling dan Distribusi Sampling
Pengujian Hipotesis (I) Pertemuan 11
Matakuliah : I0014 / Biostatistika Tahun : 2005 Versi : V1 / R1
Uji Hipotesis Dua Sampel
DISTRIBUSI BINOMIAL.
Pertemuan 25 Uji Kesamaan Proporsi
CLASS DIAGRAM.
Presentasi Statistika Dasar
Pendugaan Parameter (I) Pertemuan 9
PENDUGAAN PARAMETER Pertemuan 8
the formula for the standard deviation:
Significantly Significant
Pendugaan Parameter (II) Pertemuan 10
Uji Kesamaan Proporsi dan Uji Kebebasan Pertemuan 24
Pertemuan 09 Pengujian Hipotesis 2
Research methodology and Scientific Writing W#8
CENTRAL TENDENCY Hartanto, SIP, MA Ilmu Hubungan Internasional
Cost-Volume-Profit Analysis
An Introducation to Inferential Statistics
Eksperimen Satu Faktor: (Disain RAL)
Pertemuan 4 CLASS DIAGRAM.
Semester Pendek FMIPA UGM 2005
Uji Hipotesis Dua Sampel
Pertemuan 21 dan 22 Analisis Regresi dan Korelasi Sederhana
STATISTIK “Hypothesis Testing”
KULIAH KE 9 Elementary Statistics Eleventh Edition
Kuliah ke.7 Elementary Statistics Eleventh Edition
Lecture Slides Elementary Statistics Eleventh Edition
Lesson 2-1 Conditional Statements 1 Lesson 2-1 Conditional Statements.
By Yulius Suprianto Macroeconomics | 02 Maret 2019 Chapter-5: The Standard of Living Over Time and A Cross Countries Source: http//
Probability IIntroduction to Probability ASatisfactory outcomes vs. total outcomes BBasic Properties CTerminology IICombinatory Probability AThe Addition.
Transcript presentasi:

Hypothesis Testing Niniet Indah Arvitrida, ST, MT SepuluhNopember Institute of Technology INDONESIA 2008

A bit concept review... Statistics is... Population is... Sample is... Variable is... Parameter is... Relation between statistics & parameters... Difference between statistics and probability Statistics assumptions : Population and its parameters are (unknown / known) Sample is used to..... parameters

A bit concept review... (2) A population is a collection of all units of interest. A sample is a subset of a population that is actually observed. A measurable property or attribute associated with each unit of a population is called a variable. A parameter is a numerical characteristic of a population. A statistic is a numerical characteristic of a sample. Statistics are used to infer the values of parameters. In probability, we assume that the population and its parameters are known and compute the probability of drawing a particular sample. In statistics, we assume that the population and its parameters are unknown and the sample is used to infer the values of the parameters.

A bit concept review...

Course 1 Objectives Students able to Formulate null and alternative hypotheses Formulate null and alternative hypotheses for applications involving a single population mean or proportion testing a hypothesis Formulate a decision rule for testing a hypothesis Know how to use the test statistic, critical value, and p- value approaches to test the null hypothesis Type I Type II errors Know what Type I and Type II errors are Compute the probability of a Type II error

Review of Estimating Population Value

Point and Interval Estimates A point estimate is a single number, a confidence interval provides additional information about variability Point Estimate Lower Confidence Limit Upper Confidence Limit Width of confidence interval

Point Estimates We can estimate a Population Parameter … with a Sample Statistic (a Point Estimate) Mean Proportion p p x μ

Confidence Intervals How much uncertainty is associated with a point estimate of a population parameter? An interval estimate provides more information about a population characteristic than does a point estimate Such interval estimates are called confidence intervals

Estimation Process (mean, μ, is unknown) Population Random Sample Mean x = 50 Sample I am 95% confident that μ is between 40 & 60.

Confidence Level Confidence in which the interval will contain the unknown population parameter A percentage (less than 100%)

Confidence Interval for μ ( σ Known) Assumptions Population standard deviation σ is known Population is normally distributed If population is not normal, use large sample Confidence interval estimate

Finding the Critical Value Consider a 95% confidence interval: z.025 = -1.96z.025 = 1.96 Point Estimate Lower Confidence Limit Upper Confidence Limit z units: x units: Point Estimate 0

Margin of Error Margin of Error (e): the amount added and subtracted to the point estimate to form the confidence interval Example: Margin of error for estimating μ, σ known:

Chap 7-15 Factors Affecting Margin of Error Data variation, σ : e as σ Sample size, n : e as n Level of confidence, 1 -  : e if 1 - 

Chap 7-16 Example A sample of 11 circuits from a large normal population has a mean resistance of 2.20 ohms. We know from past testing that the population standard deviation is.35 ohms. Determine a 95% confidence interval for the true mean resistance of the population.

Chap 7-17 Example A sample of 11 circuits from a large normal population has a mean resistance of 2.20 ohms. We know from past testing that the population standard deviation is.35 ohms. Solution: (continued)

Chap 7-18 Interpretation We are 95% confident that the true mean resistance is between and ohms Although the true mean may or may not be in this interval, 95% of intervals formed in this manner will contain the true mean An incorrect interpretation is that there is 95% probability that this interval contains the true population mean. (This interval either does or does not contain the true mean, there is no probability for a single interval)

Chap 7-19 Student’s t Distribution t 0 t (df = 5) t (df = 13) t-distributions are bell- shaped and symmetric, but have ‘fatter’ tails than the normal Standard Normal (t with df =  ) Note: t z as n increases

Chap 7-20 Approximation for Large Samples Since t approaches z as the sample size increases, an approximation is sometimes used when n  30: Technically correct Approximation for large n

Now we talk about HYPOTHESIS

What is a Hypothesis? A hypothesis is a claim (assumption) about a population population parameter: mean population mean proportion population proportion Example: The mean monthly cell phone bill of this city is  = $42 Example: The proportion of adults in this city with cell phones is p =.68

The Null Hypothesis, H 0 assumption States the assumption (numerical) to be tested Example: The average number of TV sets in U.S. Homes is at least three ( ) always population Is always about a population parameter, not about a sample statistic

The Null Hypothesis, H 0 Begin null hypothesis is true Begin with the assumption that the null hypothesis is true Similar to the notion of innocent until proven guilty “=”“≤”“  ” Always contains “=”, “≤” or “  ” sign or May or may not be rejected (continued)

The Alternative Hypothesis, H A Is the opposite of the null hypothesis e.g.: The average number of TV sets in U.S. homes is less than 3 ( H A :  < 3 ) Never Never contains the “=”, “≤” or “  ” sign May or may not be accepted Is generally the hypothesis that is believed (or needs to be supported) by the researcher

Population Claim: the population mean age is 50. (Null Hypothesis: REJECT Suppose the sample mean age is 20: x = 20 Sample Null Hypothesis 20 likely if  = 50?  Is Hypothesis Testing Process If not likely, Now select a random sample H 0 :  = 50 ) x

Reason for Rejecting H 0 Sampling Distribution of x  = 50 If H 0 is true If it is unlikely that we would get a sample mean of this value then we reject the null hypothesis that  = if in fact this were the population mean… x

Level of Significance,  Defines unlikely values of sample statistic if null hypothesis is true rejection region Defines rejection region of the sampling distribution  Is designated by , (level of significance) Typical values are.01,.05, or.10 Is selected by the researcher at the beginning Provides the critical value(s) of the test

Level of Significance and the Rejection Region H 0 : μ ≥ 3 H A : μ < 3 0 H 0 : μ ≤ 3 H A : μ > 3 H 0 : μ = 3 H A : μ ≠ 3   /2 Represents critical value Lower tail test Level of significance =  0 0  /2  Upper tail test Two tailed test Rejection region is shaded 1-α

Errors in Making Decisions Type I Error Reject a true null hypothesis Considered a serious type of error The probability of Type I Error is  level of significance Called level of significance of the test Set by researcher in advance

Errors in Making Decisions Type II Error Fail to reject a false null hypothesis The probability of Type II Error is β (continued)

Outcomes and Probabilities State of Nature Decision Do Not Reject H 0 No error (1 - )  Type II Error ( β ) Reject H 0 Type I Error ( )  Possible Hypothesis Test Outcomes H 0 False H 0 True Key: Outcome (Probability) No Error ( 1 - β )

Type I & II Error Relationship  Type I and Type II errors can not happen at the same time  Type I error can only occur if H 0 is true  Type II error can only occur if H 0 is false If Type I error probability (  ), then Type II error probability ( β )

Factors Affecting Type II Error All else equal, β when the difference between hypothesized parameter and its true value β when  β when σ β when n

Critical Value Approach to Testing Convert sample statistic (e.g.: ) to test statistic ( Z or t statistic ) Determine the critical value(s) for a specified level of significance  from a table or computer If the test statistic falls in the rejection region, reject H 0 ; otherwise do not reject H 0

Lower Tail Tests Reject H 0 Do not reject H 0 The cutoff value, or, is called a critical value  -z α xαxα -zα-zα xαxα 0 μ H 0 : μ ≥ 3 H A : μ < 3

Upper Tail Tests Reject H 0 Do not reject H 0 The cutoff value, or, is called a critical value  zαzα xαxα zαzα xαxα 0 μ H 0 : μ ≤ 3 H A : μ > 3

Two Tailed Tests Do not reject H 0 Reject H 0 There are two cutoff values (critical values): or  /2 -z α/2 x α/2 ± z α/2 x α/2 0 μ0μ0 H 0 : μ = 3 H A : μ  3 z α/2 x α/2 Lower Upper x α/2 LowerUpper  /2

Critical Value Approach to Testing Convert sample statistic ( ) to a test statistic ( Z or t statistic ) x  Known Large Samples  Unknown Hypothesis Tests for  Small Samples

Calculating the Test Statistic  Known Large Samples  Unknown Hypothesis Tests for μ Small Samples The test statistic is:

Calculating the Test Statistic  Known Large Samples  Unknown Hypothesis Tests for  Small Samples The test statistic is: But is sometimes approximated using a z: (continued)

Calculating the Test Statistic  Known Large Samples  Unknown Hypothesis Tests for  Small Samples The test statistic is: (The population must be approximately normal) (continued)

Review: Steps in Hypothesis Testing 1. Specify the population value of interest 2.Formulate the appropriate null and alternative hypotheses 3. Specify the desired level of significance 4. Determine the rejection region 5. Obtain sample evidence and compute the test statistic 6. Reach a decision and interpret the result

Hypothesis Testing Example Test the claim that the true mean # of TV sets in US homes is at least 3. (Assume σ = 0.8) 1. Specify the population value of interest The mean number of TVs in US homes 2.Formulate the appropriate null and alternative hypotheses H 0 : μ  3 H A : μ < 3 (This is a lower tail test) 3. Specify the desired level of significance Suppose that  =.05 is chosen for this test

Hypothesis Testing Example 4. Determine the rejection region Reject H 0 Do not reject H 0  =.05 -z α = This is a one-tailed test with  =.05. Since σ is known, the cutoff value is a z value: Reject H 0 if z < z  = ; otherwise do not reject H 0 (continued)

Hypothesis Testing Example 5. Obtain sample evidence and compute the test statistic Suppose a sample is taken with the following results: n = 100, x = 2.84 (  = 0.8 is assumed known) Then the test statistic is:

Hypothesis Testing Example 6. Reach a decision and interpret the result Reject H 0 Do not reject H 0  = Since z = -2.0 < , we reject the null hypothesis that the mean number of TVs in US homes is at least 3 (continued) z

Hypothesis Testing Example An alternate way of constructing rejection region: Reject H 0  = Do not reject H Since x = 2.84 < , we reject the null hypothesis (continued) x Now expressed in x, not z units

p-Value Approach to Testing Convert Sample Statistic (e.g. ) to Test Statistic ( Z or t statistic ) Obtain the p-value from a table or computer Compare the p-value with  If p-value < , reject H 0 If p-value  , do not reject H 0 x

p-Value Approach to Testing p-value: Probability of obtaining a test statistic more extreme ( ≤ or  ) than the observed sample value given H 0 is true Also called observed level of significance Smallest value of  for which H 0 can be rejected (continued)

p-value example Example: How likely is it to see a sample mean of 2.84 (or something further below the mean) if the true mean is  = 3.0? p-value =.0228  = x

p-value example Compare the p-value with  If p-value < , reject H 0 If p-value  , do not reject H 0 Here: p-value =.0228  =.05 Since.0228 <.05, we reject the null hypothesis (continued) p-value =.0228  =

Example: Upper Tail z Test for Mean (  Known) A phone industry manager thinks that customer monthly cell phone bill have increased, and now average over $52 per month. The company wishes to test this claim. (Assume  = 10 is known) H 0 : μ ≤ 52 the average is not over $52 per month H A : μ > 52 the average is greater than $52 per month (i.e., sufficient evidence exists to support the manager’s claim) Form hypothesis test:

Suppose that  =.10 is chosen for this test Find the rejection region: Reject H 0 Do not reject H 0  =.10 z α = Reject H 0 Reject H 0 if z > 1.28 Example: Find Rejection Region (continued)

Review: Finding Critical Value - One Tail Z z Standard Normal Distribution Table (Portion) What is z given  = 0.10?  =.10 Critical Value =

Example: Test Statistic (continued) Obtain sample evidence and compute the test statistic Suppose a sample is taken with the following results: n = 64, x = 53.1 (  =10 was assumed known) Then the test statistic is:

Example: Decision Reach a decision and interpret the result: Reject H 0 Do not reject H 0  = Reject H 0 Do not reject H 0 since z = 0.88 ≤ 1.28 i.e.: there is not sufficient evidence that the mean bill is over $52 z =.88 (continued)

p -Value Solution Calculate the p-value and compare to  Reject H 0  =.10 Do not reject H Reject H 0 z =.88 (continued) p-value =.1894 Do not reject H 0 since p-value =.1894 >  =.10

Example: Two-Tail Test (  Unknown) The average cost of a hotel room in New York is said to be $168 per night. A random sample of 25 hotels resulted in x = $ and s = $ Test at the  = 0.05 level. (Assume the population distribution is normal) H 0 : μ  = 168 H A : μ  168

Example Solution: Two-Tail Test   = 0.05  n = 25   is unknown, so use a t statistic  Critical Value: t 24 = ± Do not reject H 0 : not sufficient evidence that true mean cost is different than $168 Reject H 0  /2=.025 -t α/2 Do not reject H 0 0 t α/2  /2= H 0 : μ  = 168 H A : μ  168

Hypothesis Tests for Proportions Involves categorical values Two possible outcomes “Success” (possesses a certain characteristic) “Failure” (does not possesses that characteristic) Fraction or proportion of population in the “success” category is denoted by p

Proportions Sample proportion in the success category is denoted by p When both np and n(1-p) are at least 5, p can be approximated by a normal distribution with mean and standard deviation (continued)

Hypothesis Tests for Proportions The sampling distribution of p is normal, so the test statistic is a z value: np  5 and n(1-p)  5 Hypothesis Tests for p np < 5 or n(1-p) < 5 Not discussed in this chapter

Example: z Test for Proportion A marketing company claims that it receives 8% responses from its mailing. To test this claim, a random sample of 500 were surveyed with 25 responses. Test at the  =.05 significance level. Check: n p = (500)(.08) = 40 n(1-p) = (500)(.92) = 460 

Z Test for Proportion: Solution  =.05 n = 500, p =.05 Reject H 0 at  =.05 H 0 : p =.08 H A : p .08 Critical Values: ± 1.96 Test Statistic: Decision: Conclusion: z 0 Reject There is sufficient evidence to reject the company’s claim of 8% response rate

p -Value Solution Calculate the p-value and compare to  (For a two sided test the p-value is always two sided) Do not reject H 0 Reject H 0  /2 = z = (continued) p-value =.0136: Reject H 0 since p-value =.0136 <  =.05 z =  /2 =

Type II Error Type II error is the probability of failing to reject a false H 0 Reject H 0 : μ  52 Do not reject H 0 : μ  Suppose we fail to reject H 0 : μ  52 when in fact the true mean is μ = 50 

Type II Error Suppose we do not reject H 0 :   52 when in fact the true mean is  = 50 Reject H 0 :   52 Do not reject H 0 :   This is the true distribution of x if  = 50 This is the range of x where H 0 is not rejected (continued)

Type II Error Suppose we do not reject H 0 : μ  52 when in fact the true mean is μ = 50 Reject H 0 : μ  52 Do not reject H 0 : μ  52  5250 β Here, β = P( x  cutoff ) if μ = 50 (continued)

Calculating β Suppose n = 64, σ = 6, and  =.05 Reject H 0 : μ  52 Do not reject H 0 : μ  52  5250 So β = P( x  ) if μ = 50 (for H 0 : μ  52)

Calculating β Suppose n = 64, σ = 6, and  =.05 Reject H 0 : μ  52 Do not reject H 0 : μ  52  5250 (continued) Probability of type II error: β =.1539

Using PHStat Options

Sample PHStat Output Input Output

Chapter Summary Addressed hypothesis testing methodology Performed z Test for the mean (σ known) Discussed p–value approach to hypothesis testing Performed one-tail and two-tail tests...

Chapter Summary Performed t test for the mean (σ unknown) Performed z test for the proportion Discussed type II error and computed its probability (continued)