🎧 New: AI-Generated Podcasts Turn your study notes into engaging audio conversations. Learn more

Hypothesis Testing - CS2MATH211 - University of Science and Technology of Southern Philippines PDF

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Document Details

HeartwarmingTourmaline

Uploaded by HeartwarmingTourmaline

University of Science and Technology of Southern Philippines

Cheryll S. Pagal, MSAMS

Tags

hypothesis testing statistics data analysis computer science

Summary

This document provides an overview of hypothesis testing, a crucial statistical concept. It defines key terms and explains the steps involved in hypothesis testing, illustrating the methods with examples. The lecture notes are aimed at computer science undergraduates.

Full Transcript

University of Science and Technology of Southern Philippines Cagayan de Oro Campus College of Information Technology and Computing Department of Computer Science SUBJECT: CS2MATH211 – STATISTICS FOR COMPUTER...

University of Science and Technology of Southern Philippines Cagayan de Oro Campus College of Information Technology and Computing Department of Computer Science SUBJECT: CS2MATH211 – STATISTICS FOR COMPUTER SCIENCE INTRUCTOR: Cheryll S. Pagal, MSAMS TOPIC: HYPOTHESIS TESTING OBJECTIVES: - Define key terms related to hypothesis testing. - Understand the importance of hypothesis testing in statistics. - Identify the steps involved in hypothesis testing. - Perform a hypothesis test using practical examples. Video: Lesson Overview In this lesson, we will explore the fundamentals of hypothesis testing, a critical concept in statistics. Hypothesis testing allows us to make informed decisions and draw conclusions about population parameters based on sample data. By the end of this lesson, you will understand the key terminology, the steps involved in hypothesis testing, and how to perform hypothesis tests. Lesson Content: Introduction to Hypothesis Testing: What is Hypothesis Testing? Definition: Hypothesis testing is a statistical method used to make inferences about a population based on sample data. Importance: It helps us assess claims, make decisions, and draw conclusions in various fields, including science, business, and healthcare. Type of Tests: One-Sample Hypothesis Test: In a one-sample hypothesis test, you have one sample of data, and you are comparing it to a known or assumed population parameter. Two-Sample Hypothesis Test: In a two-sample hypothesis test, you have two independent samples of data, and you are comparing them to each other to assess if there is a significant difference between the two populations from which the samples are drawn. Key Terminology: Null Hypothesis (HO): Definition: The null hypothesis is a statement that there is no significant effect or difference in the population. Alternative Hypothesis (Ha or H1): Definition: The alternative hypothesis is a statement that contradicts the null hypothesis. Significance Level (α): Definition: The significance level is the probability of making a Type I error (rejecting the null hypothesis when it's true). P-Value: Definition: The p-value is a measure of the strength of evidence against the null hypothesis. Test Statistic: Definition: A test statistic is a numerical value used to assess the evidence against the null hypothesis. Critical Region: Definition: The critical region is the set of values that, if the test statistic falls within it, leads to the rejection of the null hypothesis. Steps in Hypothesis Testing: Step 1: Formulate Hypotheses: - H0 (Null Hypothesis): Stating that there is no effect or no difference. - Ha (Alternative Hypothesis): Stating the desired effect or difference. Step 2: Collect and Analyze Data - Gather a sample of data. - Calculate a test statistic based on the data. Step 3: Determine the Significance Level (α) Choose a significance level (commonly 0.05 or 0.01). Step 4: Calculate the P-Value - Calculate the probability of observing the data or more extreme results assuming the null hypothesis is true. Step 5: Make a Decision - If the p-value is less than α, reject the null hypothesis. - If the p-value is greater than or equal to α, fail to reject the null hypothesis. Step 6: Draw a Conclusion - State the conclusion in the context of the problem. EXAMPLE 1: A manufacturer claims that his tires last at least 40,000 miles. A test on 25 tires reveals that the mean life of a tire is 39,750 miles, with a standard deviation of 387 miles. Test the Manufacturer’s claim at α =.01. To test the manufacturer's claim using the p-value method, follow these steps: 1. State the null and alternative hypotheses: - Null Hypothesis (H0): μ ≥ 40,000 miles (The manufacturer's claim is true) - Alternative Hypothesis (Ha): μ < 40,000 miles (The manufacturer's claim is false) 2. Determine the significance level (α), which is given as α = 0.01. This is the level of significance that determines how extreme the results must be to reject the null hypothesis. 3. Calculate the test statistic: 4. Calculate the p-value: The p-value is the probability of obtaining a test statistic as extreme as the one calculated (or even more extreme) under the null hypothesis. You can find the p-value by looking up the calculated Z-statistic (-3.233) in a standard normal distribution table or by using a calculator. In this problem the p – value is 0.0006. 5. Compare the p-value to the significance level: - If the p-value is less than α (0.01), you reject the null hypothesis. - If the p-value is greater than or equal to α, you fail to reject the null hypothesis. In this case, the p-value is very close to zero (0.0006), which is less than α (0.01). Therefore, you reject the null hypothesis. 6. State the conclusion: Based on the sample data and the p-value method, there is strong evidence to conclude that the mean life of the tires is less than 40,000 miles at the 0.01 significance level. This supports the alternative hypothesis, indicating that the manufacturer's claim is not true. EXAMPLE 2: Perform a hypothesis test where the null hypothesis is that the μ = 6.9. A random sample of 16 items is selected. The sample mean is 7.1 and the sample standard deviation is 2.4. It can be assumed that the population is normally distributed at α =.05. 1. State the null and alternative hypotheses: - Null Hypothesis (H0): μ = 6.9 - Alternative Hypothesis (Ha): μ ≠ 6.9 (two-tailed test, as we're testing for a difference in either direction) 2. Determine the significance level (α), which is given as α = 0.05. This is the level of significance that determines how extreme the results must be to reject the null hypothesis. 3. Calculate the test statistic (Z): The test statistic is calculated using the formula: 4. Calculate the p-value: Please note that you would need to look up the exact p-value for |Z| = 0.3333 in a standard normal distribution table or use statistical software to make a precise comparison. If the p-value is less than 0.025, you would reject the null hypothesis; otherwise, you would fail to reject it. To find the p-value for a two-tailed test, you would look up the absolute value of the test statistic (|Z| = 0.3333) in a standard normal distribution table or use a calculator to find the cumulative probability. The p-value represents the probability of observing a test statistic as extreme as the one calculated (or more extreme) assuming the null hypothesis is true. In this case the p – value is 0.3707. 5. Compare the p-value to the significance level: - If the p-value is less than α (0.05), you reject the null hypothesis. - If the p-value is greater than or equal to α, you fail to reject the null hypothesis. Since this is a two-tailed test and you calculated a p-value, you need to compare it to α/2 (0.05/2 = 0.025) for each tail. If the calculated p-value (for the absolute value of Z) is less than 0.025, you reject the null hypothesis. If it's greater than or equal to 0.025, you fail to reject the null hypothesis. In this case, the p-value is (0.3707) is greater than α (0.025). Therefore, we fail to reject Ho. Errors in Hypothesis Testing: In hypothesis testing, there are two types of errors that can occur: 1. Type I Error (False Positive): Definition: A Type I error occurs when we reject the null hypothesis (Ho) when it is actually true. Consequence: We conclude that there is an effect or difference when, in reality, there isn’t one. Probability of Occurring: The probability of making a Type I error is denoted by alpha (α), which is the significance level of the test (typically 5%). Example of Type I Error: Imagine a pharmaceutical company testing a new drug to determine if it reduces symptoms of a disease. Null Hypothesis (Ho): The drug has no effect. Alternative Hypothesis (H1): The drug reduces symptoms. A Type I error would occur if the company concludes that the drug is effective (rejects Ho) when, in fact, it has no effect (meaning Ho is true). 2. Type II Error (False Negative): Definition: A Type II error occurs when we fail to reject the null hypothesis (Ho) when it is actually false. Consequence: We conclude that there is no effect or difference when, in reality, there is one. Probability of Occurring: The probability of making a Type II error is denoted by beta (β). The power of the test (1 - β) is the probability of correctly rejecting Ho when H1 is true. Example of Type II Error: In the same drug-testing scenario: Null Hypothesis (Ho): The drug has no effect. Alternative Hypothesis (H1): The drug reduces symptoms. A Type II error would occur if the company concludes that the drug has no effect (fails to reject Ho) when, in fact, the drug does reduce symptoms (meaning Ho is false). SUMMARY: Type I error: Concluding a difference exists when it doesn’t. Type II error: Concluding no difference exists when there is one. Practical Examples: 1. Medical Testing: o Null Hypothesis: The patient does not have the disease. o Type I Error: The test indicates the patient has the disease (false positive). o Type II Error: The test fails to detect the disease when the patient actually has it (false negative). 2. Criminal Justice: o Null Hypothesis: The defendant is innocent. o Type I Error: Convicting an innocent person (false positive). o Type II Error: Acquitting a guilty person (false negative). ASSESSMENT: Deadline: October 04, 2024 Answer in a one whole sheet of plain white paper. Show your solutions. Save your file with your last name then drop it on the link for your section below. A fast food outlet claims that the mean waiting time in line is less than 1.9 minutes. A random sample of 20 customers has a mean of 1.7 minutes with a standard deviation of 0.8 minute. If α = 0.05, test the fast food outlet's claim using P-values. CS2A LINK CS2B LINK CS2C LINK CS2C LINK REFERENCE: https://www.z-table.com/ https://www.youtube.com/watch?v=8Aw45HN5lnA https://www.statisticshowto.com/probability-and-statistics/hypothesis-testing/

Use Quizgecko on...
Browser
Browser