Week5OGLHypothesisTesting

docx

School

University Canada West *

*We aren’t endorsed by this school

Course

650

Subject

Statistics

Date

Feb 20, 2024

Type

docx

Pages

13

Uploaded by BarristerWorldNarwhal21

Report
Hypothesis Testing In this assignment, we will walk together and perform a Hypothesis test. Problem : The students at UCW are supposed to have an average age of 26.8 years old and a standard deviation of 3.95 years, based on a study done in 2021. We will challenge this average age (26.8) in the rest of this document. Note: We will consider the significance level α = 0.05 in our calculations. Choosing the right statistical test : Follow the below flowchart when you need to decide the right statistical test for your problem. Figure 1: Decision chart. Now, complete the following table. Null Hypothesis: The average age of UCW student is 26.8 years old Alternative Hypothesis: The average age of the students at UCW is not 26.8 years old. Tails of test: Two tailed-test.
1. Z-test Consider a sample of ages given in the “students age” file. Based on the given decision chart in Figure 1, justify why this is a Z-test, and complete the following section. Explain why this is Z-test: The sample mean and the known population mean—26.8 years old—are being compared. The population standard deviation is available to us (3.95 years). The sample size—typically n > 30 is considered large enough—is likely enough to support the use of the Z-test. Because we decide whether the average age is 26.8, the test involves two tails, so we'll are interested in deviations from the estimated mean in both cases. We will perform the Z-test using two approaches, (i) using Z-table and (ii) using Excel functions. Apply Z- test using Z-table : Use the following formula to calculate the test score: where x sample average μ population average σ population standard deviation n sample size Based on the Z-score and significance level α , calculate the (gray) area on the left side of Z-score, according to the following Z-tables. z score = x μ σ n
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Fill the following table: z score 1.917 α 0.05 Since its two-tail test Alpha is calculated as (0.05/2 = 0.025) A 1 (gray area on the left side of z score ) 0.971 Now to calculate the “p-value”, we need to follow one of the following methods depending on the sign of Z-score. (a) Negative Z-score: gray area: A 1 p-value = 2 * A 1 (b) Positive Z-score: gray area: A 1 p-value = 2 * ( 1 A 1 ) Fill the following table based on the calculate p-value: P-value 0.056
Now complete the following table: Z-score 1.917 Z-critical 1.96 p-value 0.056 Rejection area 0.05 Then depending on the sign of Z-score, you can decide if the results are significant enough to reject the null hypothesis or not: If Z-score > 0: Approach 1: reject null hypothesis if Z-score > Z-critical. Approach 2: reject the null hypothesis if p-value < 0.05. Note: both approaches are equivalent and lead to the same result. If Z-score < 0: Approach 1: reject null hypothesis if Z-score < ¿ (Z-critical). Approach 2: reject the null hypothesis if p-value < 0.05. Note: both approaches are equivalent and lead to the same result. Complete the following table: Decision (reject or accept the null hypothesis) Approach 1 Reject (because Z-score > Z-critical)
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Approach 2 Fail to reject (because p-value > 0.05) Apply Z-test using Excel : In this part, instead of Z-table we will use excel functions to perform the calculations. Unlike the Z-table, the following Excel function calculates the area on the right side of the Z-score. Use the following Excel function and call it A 2 , where: Sampl e vector of samples: for example: (22,32,30,27,29,25,24,…) μ population average σ population standard deviation Fill the following table: z score 1.917 α 0.05 A 2 0.972 Now to calculate the p-value, we need to follow one of the following method depending on the sign of Z- score. (a) Negative Z-score: A 2 p-value = 2 * ( 1 A 2 ) Z.TEST(sample, μ , σ )
(b) Positive Z-score: A 2 p-value = 2 * A 2 Fill the following table: P-value 1.944. Now complete the following table: Z-score 1.917 Z-critical 1.96 p-value 1.944 Rejection area 0.05
Complete the following table: Decision (reject or accept the null hypothesis) Approach 1 Reject Approach 2 Fail to reject 2. T-test For this section, we need a different sample set. To collect your sample, ask age of 5 five students in your class, together with your age would make a sample of size 6. Based on the given decision chart in Figure 1, justify why this is a T-test, and complete the following section. Why this is a T-test: The sample standard deviation, not the population's standard deviation, is what we have, so we're using a T-test. It wasn't desirable to use our limited sample size for a Z-test. When the number of samples is limited, the T-test helps in providing an accurate estimate of the population parameter. The T-test is the best option because we don't have the population standard deviation, even if we compare the sample mean to a known population mean. Thus, a T- test is a best choice for data analysis due to the limited sample size and unknown population standard deviation. We will perform the T-test using two approaches, (i) T-table and (ii) Excel functions. Apply T-test using T-table : Use the following formula to calculate the t-score: where t score = x μ s n
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
x sample average μ population average s sample standard deviation n sample size Important : When using t-table, we will always consider the absolute value of t-score, so if it is negative, we will just consider its absolute value. To calculate t_critical, we need to first calculate the degree of freedom (df). Here is the definition of df: Now complete the following table: df 30 df = n 1
Based on the significance level α and degree of freedom (df), calculate the gray area on the right side of t-score, according to the above T-table, and call it “t-critical”. Fill the following table: t score 0.48 α 0.05 t-critical (what you read from t-table) 2.042 Our criterion is then to reject null hypothesis if t-score > t-critical. Fill the table below. Decision (reject or accept the null hypothesis) Above approach according to the above approach, we accept the null hypothesis. Apply T-test using Excel : Now, instead of T-table we will use excel functions to perform the calculations. Use the following Excel function to calculate and call it p-value. Also, we can use the Excel function and call it t-critical. Fill the following table: t-score 0.206 t-critical 2.042 p-value 0.839 Rejection area 0.05 T.DIST.2T(t-score, df) T.INV.2T(alpha, df)
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Then we can decide the result of our test based on two approaches: Approach 1: reject null hypothesis if t-score > t-critical. Approach 2: reject the null hypothesis if p-value < 0.05. Note: both approaches are equivalent and lead to the same result. Finally, complete the following table: Decision (reject or accept the null hypothesis) Approach 1 Accept Approach 2 Accept