| α | Z | 0.10 | 1.282 | 0.05 | 1.645 | 0.025 | 1.960 | 0.010 | 2.326 | 0.005 | 2.576 | 0.001 | 3.090 | 0.0001 | 3.719 | ![hypothesis testing for 2 means Standard normal distribution with lower tail at -1.645 and alpha=0.05](https://sphweb.bumc.bu.edu/Standard Normal Distribution lower tail.png) Rejection Region for Lower-Tailed Z Test (H 1 : μ < μ 0 ) with α =0.05 The decision rule is: Reject H 0 if Z < 1.645. | a | Z | 0.10 | -1.282 | 0.05 | -1.645 | 0.025 | -1.960 | 0.010 | -2.326 | 0.005 | -2.576 | 0.001 | -3.090 | 0.0001 | -3.719 | ![hypothesis testing for 2 means Standard normal distribution with two tails](https://sphweb.bumc.bu.edu/Standard Normal Distribution both tails.png) Rejection Region for Two-Tailed Z Test (H 1 : μ ≠ μ 0 ) with α =0.05 The decision rule is: Reject H 0 if Z < -1.960 or if Z > 1.960. | | | 0.20 | 1.282 | 0.10 | 1.645 | 0.05 | 1.960 | 0.010 | 2.576 | 0.001 | 3.291 | 0.0001 | 3.819 | The complete table of critical values of Z for upper, lower and two-tailed tests can be found in the table of Z values to the right in "Other Resources." Critical values of t for upper, lower and two-tailed tests can be found in the table of t values in "Other Resources." - Step 4. Compute the test statistic.
Here we compute the test statistic by substituting the observed sample data into the test statistic identified in Step 2. The final conclusion is made by comparing the test statistic (which is a summary of the information observed in the sample) to the decision rule. The final conclusion will be either to reject the null hypothesis (because the sample data are very unlikely if the null hypothesis is true) or not to reject the null hypothesis (because the sample data are not very unlikely). If the null hypothesis is rejected, then an exact significance level is computed to describe the likelihood of observing the sample data assuming that the null hypothesis is true. The exact level of significance is called the p-value and it will be less than the chosen level of significance if we reject H 0 . Statistical computing packages provide exact p-values as part of their standard output for hypothesis tests. In fact, when using a statistical computing package, the steps outlined about can be abbreviated. The hypotheses (step 1) should always be set up in advance of any analysis and the significance criterion should also be determined (e.g., α =0.05). Statistical computing packages will produce the test statistic (usually reporting the test statistic as t) and a p-value. The investigator can then determine statistical significance using the following: If p < α then reject H 0 . - Step 1. Set up hypotheses and determine level of significance
H 0 : μ = 191 H 1 : μ > 191 α =0.05 The research hypothesis is that weights have increased, and therefore an upper tailed test is used. - Step 2. Select the appropriate test statistic.
Because the sample size is large (n > 30) the appropriate test statistic is - Step 3. Set up decision rule.
In this example, we are performing an upper tailed test (H 1 : μ> 191), with a Z test statistic and selected α =0.05. Reject H 0 if Z > 1.645. We now substitute the sample data into the formula for the test statistic identified in Step 2. We reject H 0 because 2.38 > 1.645. We have statistically significant evidence at a =0.05, to show that the mean weight in men in 2006 is more than 191 pounds. Because we rejected the null hypothesis, we now approximate the p-value which is the likelihood of observing the sample data if the null hypothesis is true. An alternative definition of the p-value is the smallest level of significance where we can still reject H 0 . In this example, we observed Z=2.38 and for α=0.05, the critical value was 1.645. Because 2.38 exceeded 1.645 we rejected H 0 . In our conclusion we reported a statistically significant increase in mean weight at a 5% level of significance. Using the table of critical values for upper tailed tests, we can approximate the p-value. If we select α=0.025, the critical value is 1.96, and we still reject H 0 because 2.38 > 1.960. If we select α=0.010 the critical value is 2.326, and we still reject H 0 because 2.38 > 2.326. However, if we select α=0.005, the critical value is 2.576, and we cannot reject H 0 because 2.38 < 2.576. Therefore, the smallest α where we still reject H 0 is 0.010. This is the p-value. A statistical computing package would produce a more precise p-value which would be in between 0.005 and 0.010. Here we are approximating the p-value and would report p < 0.010. Type I and Type II ErrorsIn all tests of hypothesis, there are two types of errors that can be committed. The first is called a Type I error and refers to the situation where we incorrectly reject H 0 when in fact it is true. This is also called a false positive result (as we incorrectly conclude that the research hypothesis is true when in fact it is not). When we run a test of hypothesis and decide to reject H 0 (e.g., because the test statistic exceeds the critical value in an upper tailed test) then either we make a correct decision because the research hypothesis is true or we commit a Type I error. The different conclusions are summarized in the table below. Note that we will never know whether the null hypothesis is really true or false (i.e., we will never know which row of the following table reflects reality). Table - Conclusions in Test of Hypothesis | | | is True | Correct Decision | Type I Error | is False | Type II Error | Correct Decision | In the first step of the hypothesis test, we select a level of significance, α, and α= P(Type I error). Because we purposely select a small value for α, we control the probability of committing a Type I error. For example, if we select α=0.05, and our test tells us to reject H 0 , then there is a 5% probability that we commit a Type I error. Most investigators are very comfortable with this and are confident when rejecting H 0 that the research hypothesis is true (as it is the more likely scenario when we reject H 0 ). When we run a test of hypothesis and decide not to reject H 0 (e.g., because the test statistic is below the critical value in an upper tailed test) then either we make a correct decision because the null hypothesis is true or we commit a Type II error. Beta (β) represents the probability of a Type II error and is defined as follows: β=P(Type II error) = P(Do not Reject H 0 | H 0 is false). Unfortunately, we cannot choose β to be small (e.g., 0.05) to control the probability of committing a Type II error because β depends on several factors including the sample size, α, and the research hypothesis. When we do not reject H 0 , it may be very likely that we are committing a Type II error (i.e., failing to reject H 0 when in fact it is false). Therefore, when tests are run and the null hypothesis is not rejected we often make a weak concluding statement allowing for the possibility that we might be committing a Type II error. If we do not reject H 0 , we conclude that we do not have significant evidence to show that H 1 is true. We do not conclude that H 0 is true. ![hypothesis testing for 2 means Lightbulb icon signifying an important idea](https://sphweb.bumc.bu.edu/LightBulb.jpg) The most common reason for a Type II error is a small sample size. Tests with One Sample, Continuous OutcomeHypothesis testing applications with a continuous outcome variable in a single population are performed according to the five-step procedure outlined above. A key component is setting up the null and research hypotheses. The objective is to compare the mean in a single population to known mean (μ 0 ). The known value is generally derived from another study or report, for example a study in a similar, but not identical, population or a study performed some years ago. The latter is called a historical control. It is important in setting up the hypotheses in a one sample test that the mean specified in the null hypothesis is a fair and reasonable comparator. This will be discussed in the examples that follow. Test Statistics for Testing H 0 : μ= μ 0 Note that statistical computing packages will use the t statistic exclusively and make the necessary adjustments for comparing the test statistic to appropriate values from probability tables to produce a p-value. The National Center for Health Statistics (NCHS) published a report in 2005 entitled Health, United States, containing extensive information on major trends in the health of Americans. Data are provided for the US population as a whole and for specific ages, sexes and races. The NCHS report indicated that in 2002 Americans paid an average of $3,302 per year on health care and prescription drugs. An investigator hypothesizes that in 2005 expenditures have decreased primarily due to the availability of generic drugs. To test the hypothesis, a sample of 100 Americans are selected and their expenditures on health care and prescription drugs in 2005 are measured. The sample data are summarized as follows: n=100, x̄ =$3,190 and s=$890. Is there statistical evidence of a reduction in expenditures on health care and prescription drugs in 2005? Is the sample mean of $3,190 evidence of a true reduction in the mean or is it within chance fluctuation? We will run the test using the five-step approach. - Step 1. Set up hypotheses and determine level of significance
H 0 : μ = 3,302 H 1 : μ < 3,302 α =0.05 The research hypothesis is that expenditures have decreased, and therefore a lower-tailed test is used. This is a lower tailed test, using a Z statistic and a 5% level of significance. Reject H 0 if Z < -1.645. - Step 4. Compute the test statistic.
We do not reject H 0 because -1.26 > -1.645. We do not have statistically significant evidence at α=0.05 to show that the mean expenditures on health care and prescription drugs are lower in 2005 than the mean of $3,302 reported in 2002. Recall that when we fail to reject H 0 in a test of hypothesis that either the null hypothesis is true (here the mean expenditures in 2005 are the same as those in 2002 and equal to $3,302) or we committed a Type II error (i.e., we failed to reject H 0 when in fact it is false). In summarizing this test, we conclude that we do not have sufficient evidence to reject H 0 . We do not conclude that H 0 is true, because there may be a moderate to high probability that we committed a Type II error. It is possible that the sample size is not large enough to detect a difference in mean expenditures. The NCHS reported that the mean total cholesterol level in 2002 for all adults was 203. Total cholesterol levels in participants who attended the seventh examination of the Offspring in the Framingham Heart Study are summarized as follows: n=3,310, x̄ =200.3, and s=36.8. Is there statistical evidence of a difference in mean cholesterol levels in the Framingham Offspring? Here we want to assess whether the sample mean of 200.3 in the Framingham sample is statistically significantly different from 203 (i.e., beyond what we would expect by chance). We will run the test using the five-step approach. H 0 : μ= 203 H 1 : μ≠ 203 α=0.05 The research hypothesis is that cholesterol levels are different in the Framingham Offspring, and therefore a two-tailed test is used. - Step 3. Set up decision rule.
This is a two-tailed test, using a Z statistic and a 5% level of significance. Reject H 0 if Z < -1.960 or is Z > 1.960. We reject H 0 because -4.22 ≤ -1. .960. We have statistically significant evidence at α=0.05 to show that the mean total cholesterol level in the Framingham Offspring is different from the national average of 203 reported in 2002. Because we reject H 0 , we also approximate a p-value. Using the two-sided significance levels, p < 0.0001. Statistical Significance versus Clinical (Practical) SignificanceThis example raises an important concept of statistical versus clinical or practical significance. From a statistical standpoint, the total cholesterol levels in the Framingham sample are highly statistically significantly different from the national average with p < 0.0001 (i.e., there is less than a 0.01% chance that we are incorrectly rejecting the null hypothesis). However, the sample mean in the Framingham Offspring study is 200.3, less than 3 units different from the national mean of 203. The reason that the data are so highly statistically significant is due to the very large sample size. It is always important to assess both statistical and clinical significance of data. This is particularly relevant when the sample size is large. Is a 3 unit difference in total cholesterol a meaningful difference? Consider again the NCHS-reported mean total cholesterol level in 2002 for all adults of 203. Suppose a new drug is proposed to lower total cholesterol. A study is designed to evaluate the efficacy of the drug in lowering cholesterol. Fifteen patients are enrolled in the study and asked to take the new drug for 6 weeks. At the end of 6 weeks, each patient's total cholesterol level is measured and the sample statistics are as follows: n=15, x̄ =195.9 and s=28.7. Is there statistical evidence of a reduction in mean total cholesterol in patients after using the new drug for 6 weeks? We will run the test using the five-step approach. H 0 : μ= 203 H 1 : μ< 203 α=0.05 - Step 2. Select the appropriate test statistic.
Because the sample size is small (n<30) the appropriate test statistic is This is a lower tailed test, using a t statistic and a 5% level of significance. In order to determine the critical value of t, we need degrees of freedom, df, defined as df=n-1. In this example df=15-1=14. The critical value for a lower tailed test with df=14 and a =0.05 is -2.145 and the decision rule is as follows: Reject H 0 if t < -2.145. We do not reject H 0 because -0.96 > -2.145. We do not have statistically significant evidence at α=0.05 to show that the mean total cholesterol level is lower than the national mean in patients taking the new drug for 6 weeks. Again, because we failed to reject the null hypothesis we make a weaker concluding statement allowing for the possibility that we may have committed a Type II error (i.e., failed to reject H 0 when in fact the drug is efficacious). ![hypothesis testing for 2 means Lightbulb icon signifyig an important idea](https://sphweb.bumc.bu.edu/LightBulb.jpg) This example raises an important issue in terms of study design. In this example we assume in the null hypothesis that the mean cholesterol level is 203. This is taken to be the mean cholesterol level in patients without treatment. Is this an appropriate comparator? Alternative and potentially more efficient study designs to evaluate the effect of the new drug could involve two treatment groups, where one group receives the new drug and the other does not, or we could measure each patient's baseline or pre-treatment cholesterol level and then assess changes from baseline to 6 weeks post-treatment. These designs are also discussed here. Video - Comparing a Sample Mean to Known Population Mean (8:20) Link to transcript of the video Tests with One Sample, Dichotomous OutcomeHypothesis testing applications with a dichotomous outcome variable in a single population are also performed according to the five-step procedure. Similar to tests for means, a key component is setting up the null and research hypotheses. The objective is to compare the proportion of successes in a single population to a known proportion (p 0 ). That known proportion is generally derived from another study or report and is sometimes called a historical control. It is important in setting up the hypotheses in a one sample test that the proportion specified in the null hypothesis is a fair and reasonable comparator. In one sample tests for a dichotomous outcome, we set up our hypotheses against an appropriate comparator. We select a sample and compute descriptive statistics on the sample data. Specifically, we compute the sample size (n) and the sample proportion which is computed by taking the ratio of the number of successes to the sample size, We then determine the appropriate test statistic (Step 2) for the hypothesis test. The formula for the test statistic is given below. Test Statistic for Testing H 0 : p = p 0 if min(np 0 , n(1-p 0 )) > 5 The formula above is appropriate for large samples, defined when the smaller of np 0 and n(1-p 0 ) is at least 5. This is similar, but not identical, to the condition required for appropriate use of the confidence interval formula for a population proportion, i.e., Here we use the proportion specified in the null hypothesis as the true proportion of successes rather than the sample proportion. If we fail to satisfy the condition, then alternative procedures, called exact methods must be used to test the hypothesis about the population proportion. Example: The NCHS report indicated that in 2002 the prevalence of cigarette smoking among American adults was 21.1%. Data on prevalent smoking in n=3,536 participants who attended the seventh examination of the Offspring in the Framingham Heart Study indicated that 482/3,536 = 13.6% of the respondents were currently smoking at the time of the exam. Suppose we want to assess whether the prevalence of smoking is lower in the Framingham Offspring sample given the focus on cardiovascular health in that community. Is there evidence of a statistically lower prevalence of smoking in the Framingham Offspring study as compared to the prevalence among all Americans? H 0 : p = 0.211 H 1 : p < 0.211 α=0.05 We must first check that the sample size is adequate. Specifically, we need to check min(np 0 , n(1-p 0 )) = min( 3,536(0.211), 3,536(1-0.211))=min(746, 2790)=746. The sample size is more than adequate so the following formula can be used: This is a lower tailed test, using a Z statistic and a 5% level of significance. Reject H 0 if Z < -1.645. We reject H 0 because -10.93 < -1.645. We have statistically significant evidence at α=0.05 to show that the prevalence of smoking in the Framingham Offspring is lower than the prevalence nationally (21.1%). Here, p < 0.0001. The NCHS report indicated that in 2002, 75% of children aged 2 to 17 saw a dentist in the past year. An investigator wants to assess whether use of dental services is similar in children living in the city of Boston. A sample of 125 children aged 2 to 17 living in Boston are surveyed and 64 reported seeing a dentist over the past 12 months. Is there a significant difference in use of dental services between children living in Boston and the national data? Calculate this on your own before checking the answer. Video - Hypothesis Test for One Sample and a Dichotomous Outcome (3:55) Tests with Two Independent Samples, Continuous OutcomeThere are many applications where it is of interest to compare two independent groups with respect to their mean scores on a continuous outcome. Here we compare means between groups, but rather than generating an estimate of the difference, we will test whether the observed difference (increase, decrease or difference) is statistically significant or not. Remember, that hypothesis testing gives an assessment of statistical significance, whereas estimation gives an estimate of effect and both are important. Here we discuss the comparison of means when the two comparison groups are independent or physically separate. The two groups might be determined by a particular attribute (e.g., sex, diagnosis of cardiovascular disease) or might be set up by the investigator (e.g., participants assigned to receive an experimental treatment or placebo). The first step in the analysis involves computing descriptive statistics on each of the two samples. Specifically, we compute the sample size, mean and standard deviation in each sample and we denote these summary statistics as follows: for sample 1: for sample 2: The designation of sample 1 and sample 2 is arbitrary. In a clinical trial setting the convention is to call the treatment group 1 and the control group 2. However, when comparing men and women, for example, either group can be 1 or 2. In the two independent samples application with a continuous outcome, the parameter of interest in the test of hypothesis is the difference in population means, μ 1 -μ 2 . The null hypothesis is always that there is no difference between groups with respect to means, i.e., The null hypothesis can also be written as follows: H 0 : μ 1 = μ 2 . In the research hypothesis, an investigator can hypothesize that the first mean is larger than the second (H 1 : μ 1 > μ 2 ), that the first mean is smaller than the second (H 1 : μ 1 < μ 2 ), or that the means are different (H 1 : μ 1 ≠ μ 2 ). The three different alternatives represent upper-, lower-, and two-tailed tests, respectively. The following test statistics are used to test these hypotheses. Test Statistics for Testing H 0 : μ 1 = μ 2 - if n 1 > 30 and n 2 > 30
- if n 1 < 30 or n 2 < 30
NOTE: The formulas above assume equal variability in the two populations (i.e., the population variances are equal, or s 1 2 = s 2 2 ). This means that the outcome is equally variable in each of the comparison populations. For analysis, we have samples from each of the comparison populations. If the sample variances are similar, then the assumption about variability in the populations is probably reasonable. As a guideline, if the ratio of the sample variances, s 1 2 /s 2 2 is between 0.5 and 2 (i.e., if one variance is no more than double the other), then the formulas above are appropriate. If the ratio of the sample variances is greater than 2 or less than 0.5 then alternative formulas must be used to account for the heterogeneity in variances. The test statistics include Sp, which is the pooled estimate of the common standard deviation (again assuming that the variances in the populations are similar) computed as the weighted average of the standard deviations in the samples as follows: Because we are assuming equal variances between groups, we pool the information on variability (sample variances) to generate an estimate of the variability in the population. Note: Because Sp is a weighted average of the standard deviations in the sample, Sp will always be in between s 1 and s 2 .) Data measured on n=3,539 participants who attended the seventh examination of the Offspring in the Framingham Heart Study are shown below. | | | Characteristic | n | | S | n | | s | Systolic Blood Pressure | 1,623 | 128.2 | 17.5 | 1,911 | 126.5 | 20.1 | Diastolic Blood Pressure | 1,622 | 75.6 | 9.8 | 1,910 | 72.6 | 9.7 | Total Serum Cholesterol | 1,544 | 192.4 | 35.2 | 1,766 | 207.1 | 36.7 | Weight | 1,612 | 194.0 | 33.8 | 1,894 | 157.7 | 34.6 | Height | 1,545 | 68.9 | 2.7 | 1,781 | 63.4 | 2.5 | Body Mass Index | 1,545 | 28.8 | 4.6 | 1,781 | 27.6 | 5.9 | Suppose we now wish to assess whether there is a statistically significant difference in mean systolic blood pressures between men and women using a 5% level of significance. H 0 : μ 1 = μ 2 H 1 : μ 1 ≠ μ 2 α=0.05 Because both samples are large ( > 30), we can use the Z test statistic as opposed to t. Note that statistical computing packages use t throughout. Before implementing the formula, we first check whether the assumption of equality of population variances is reasonable. The guideline suggests investigating the ratio of the sample variances, s 1 2 /s 2 2 . Suppose we call the men group 1 and the women group 2. Again, this is arbitrary; it only needs to be noted when interpreting the results. The ratio of the sample variances is 17.5 2 /20.1 2 = 0.76, which falls between 0.5 and 2 suggesting that the assumption of equality of population variances is reasonable. The appropriate test statistic is We now substitute the sample data into the formula for the test statistic identified in Step 2. Before substituting, we will first compute Sp, the pooled estimate of the common standard deviation. Notice that the pooled estimate of the common standard deviation, Sp, falls in between the standard deviations in the comparison groups (i.e., 17.5 and 20.1). Sp is slightly closer in value to the standard deviation in the women (20.1) as there were slightly more women in the sample. Recall, Sp is a weight average of the standard deviations in the comparison groups, weighted by the respective sample sizes. Now the test statistic: We reject H 0 because 2.66 > 1.960. We have statistically significant evidence at α=0.05 to show that there is a difference in mean systolic blood pressures between men and women. The p-value is p < 0.010. Here again we find that there is a statistically significant difference in mean systolic blood pressures between men and women at p < 0.010. Notice that there is a very small difference in the sample means (128.2-126.5 = 1.7 units), but this difference is beyond what would be expected by chance. Is this a clinically meaningful difference? The large sample size in this example is driving the statistical significance. A 95% confidence interval for the difference in mean systolic blood pressures is: 1.7 + 1.26 or (0.44, 2.96). The confidence interval provides an assessment of the magnitude of the difference between means whereas the test of hypothesis and p-value provide an assessment of the statistical significance of the difference. Above we performed a study to evaluate a new drug designed to lower total cholesterol. The study involved one sample of patients, each patient took the new drug for 6 weeks and had their cholesterol measured. As a means of evaluating the efficacy of the new drug, the mean total cholesterol following 6 weeks of treatment was compared to the NCHS-reported mean total cholesterol level in 2002 for all adults of 203. At the end of the example, we discussed the appropriateness of the fixed comparator as well as an alternative study design to evaluate the effect of the new drug involving two treatment groups, where one group receives the new drug and the other does not. Here, we revisit the example with a concurrent or parallel control group, which is very typical in randomized controlled trials or clinical trials (refer to the EP713 module on Clinical Trials). A new drug is proposed to lower total cholesterol. A randomized controlled trial is designed to evaluate the efficacy of the medication in lowering cholesterol. Thirty participants are enrolled in the trial and are randomly assigned to receive either the new drug or a placebo. The participants do not know which treatment they are assigned. Each participant is asked to take the assigned treatment for 6 weeks. At the end of 6 weeks, each patient's total cholesterol level is measured and the sample statistics are as follows. Treatment | | | | New Drug | 15 | 195.9 | 28.7 | Placebo | 15 | 227.4 | 30.3 | Is there statistical evidence of a reduction in mean total cholesterol in patients taking the new drug for 6 weeks as compared to participants taking placebo? We will run the test using the five-step approach. H 0 : μ 1 = μ 2 H 1 : μ 1 < μ 2 α=0.05 Because both samples are small (< 30), we use the t test statistic. Before implementing the formula, we first check whether the assumption of equality of population variances is reasonable. The ratio of the sample variances, s 1 2 /s 2 2 =28.7 2 /30.3 2 = 0.90, which falls between 0.5 and 2, suggesting that the assumption of equality of population variances is reasonable. The appropriate test statistic is: This is a lower-tailed test, using a t statistic and a 5% level of significance. The appropriate critical value can be found in the t Table (in More Resources to the right). In order to determine the critical value of t we need degrees of freedom, df, defined as df=n 1 +n 2 -2 = 15+15-2=28. The critical value for a lower tailed test with df=28 and α=0.05 is -1.701 and the decision rule is: Reject H 0 if t < -1.701. Now the test statistic, We reject H 0 because -2.92 < -1.701. We have statistically significant evidence at α=0.05 to show that the mean total cholesterol level is lower in patients taking the new drug for 6 weeks as compared to patients taking placebo, p < 0.005. The clinical trial in this example finds a statistically significant reduction in total cholesterol, whereas in the previous example where we had a historical control (as opposed to a parallel control group) we did not demonstrate efficacy of the new drug. Notice that the mean total cholesterol level in patients taking placebo is 217.4 which is very different from the mean cholesterol reported among all Americans in 2002 of 203 and used as the comparator in the prior example. The historical control value may not have been the most appropriate comparator as cholesterol levels have been increasing over time. In the next section, we present another design that can be used to assess the efficacy of the new drug. Video - Comparison of Two Independent Samples With a Continuous Outcome (8:02) Tests with Matched Samples, Continuous OutcomeIn the previous section we compared two groups with respect to their mean scores on a continuous outcome. An alternative study design is to compare matched or paired samples. The two comparison groups are said to be dependent, and the data can arise from a single sample of participants where each participant is measured twice (possibly before and after an intervention) or from two samples that are matched on specific characteristics (e.g., siblings). When the samples are dependent, we focus on difference scores in each participant or between members of a pair and the test of hypothesis is based on the mean difference, μ d . The null hypothesis again reflects "no difference" and is stated as H 0 : μ d =0 . Note that there are some instances where it is of interest to test whether there is a difference of a particular magnitude (e.g., μ d =5) but in most instances the null hypothesis reflects no difference (i.e., μ d =0). The appropriate formula for the test of hypothesis depends on the sample size. The formulas are shown below and are identical to those we presented for estimating the mean of a single sample presented (e.g., when comparing against an external or historical control), except here we focus on difference scores. Test Statistics for Testing H 0 : μ d =0 A new drug is proposed to lower total cholesterol and a study is designed to evaluate the efficacy of the drug in lowering cholesterol. Fifteen patients agree to participate in the study and each is asked to take the new drug for 6 weeks. However, before starting the treatment, each patient's total cholesterol level is measured. The initial measurement is a pre-treatment or baseline value. After taking the drug for 6 weeks, each patient's total cholesterol level is measured again and the data are shown below. The rightmost column contains difference scores for each patient, computed by subtracting the 6 week cholesterol level from the baseline level. The differences represent the reduction in total cholesterol over 4 weeks. (The differences could have been computed by subtracting the baseline total cholesterol level from the level measured at 6 weeks. The way in which the differences are computed does not affect the outcome of the analysis only the interpretation.) | | | | 1 | 215 | 205 | 10 | 2 | 190 | 156 | 34 | 3 | 230 | 190 | 40 | 4 | 220 | 180 | 40 | 5 | 214 | 201 | 13 | 6 | 240 | 227 | 13 | 7 | 210 | 197 | 13 | 8 | 193 | 173 | 20 | 9 | 210 | 204 | 6 | 10 | 230 | 217 | 13 | 11 | 180 | 142 | 38 | 12 | 260 | 262 | -2 | 13 | 210 | 207 | 3 | 14 | 190 | 184 | 6 | 15 | 200 | 193 | 7 | Because the differences are computed by subtracting the cholesterols measured at 6 weeks from the baseline values, positive differences indicate reductions and negative differences indicate increases (e.g., participant 12 increases by 2 units over 6 weeks). The goal here is to test whether there is a statistically significant reduction in cholesterol. Because of the way in which we computed the differences, we want to look for an increase in the mean difference (i.e., a positive reduction). In order to conduct the test, we need to summarize the differences. In this sample, we have The calculations are shown below. | | | 1 | 10 | 100 | 2 | 34 | 1156 | 3 | 40 | 1600 | 4 | 40 | 1600 | 5 | 13 | 169 | 6 | 13 | 169 | 7 | 13 | 169 | 8 | 20 | 400 | 9 | 6 | 36 | 10 | 13 | 169 | 11 | 38 | 1444 | 12 | -2 | 4 | 13 | 3 | 9 | 14 | 6 | 36 | 15 | 7 | 49 | | | | Is there statistical evidence of a reduction in mean total cholesterol in patients after using the new medication for 6 weeks? We will run the test using the five-step approach. H 0 : μ d = 0 H 1 : μ d > 0 α=0.05 NOTE: If we had computed differences by subtracting the baseline level from the level measured at 6 weeks then negative differences would have reflected reductions and the research hypothesis would have been H 1 : μ d < 0. - Step 2 . Select the appropriate test statistic.
This is an upper-tailed test, using a t statistic and a 5% level of significance. The appropriate critical value can be found in the t Table at the right, with df=15-1=14. The critical value for an upper-tailed test with df=14 and α=0.05 is 2.145 and the decision rule is Reject H 0 if t > 2.145. We now substitute the sample data into the formula for the test statistic identified in Step 2. We reject H 0 because 4.61 > 2.145. We have statistically significant evidence at α=0.05 to show that there is a reduction in cholesterol levels over 6 weeks. Here we illustrate the use of a matched design to test the efficacy of a new drug to lower total cholesterol. We also considered a parallel design (randomized clinical trial) and a study using a historical comparator. It is extremely important to design studies that are best suited to detect a meaningful difference when one exists. There are often several alternatives and investigators work with biostatisticians to determine the best design for each application. It is worth noting that the matched design used here can be problematic in that observed differences may only reflect a "placebo" effect. All participants took the assigned medication, but is the observed reduction attributable to the medication or a result of these participation in a study. Video - Hypothesis Testing With a Matched Sample and a Continuous Outcome (3:11) Tests with Two Independent Samples, Dichotomous OutcomeThere are several approaches that can be used to test hypotheses concerning two independent proportions. Here we present one approach - the chi-square test of independence is an alternative, equivalent, and perhaps more popular approach to the same analysis. Hypothesis testing with the chi-square test is addressed in the third module in this series: BS704_HypothesisTesting-ChiSquare. In tests of hypothesis comparing proportions between two independent groups, one test is performed and results can be interpreted to apply to a risk difference, relative risk or odds ratio. As a reminder, the risk difference is computed by taking the difference in proportions between comparison groups, the risk ratio is computed by taking the ratio of proportions, and the odds ratio is computed by taking the ratio of the odds of success in the comparison groups. Because the null values for the risk difference, the risk ratio and the odds ratio are different, the hypotheses in tests of hypothesis look slightly different depending on which measure is used. When performing tests of hypothesis for the risk difference, relative risk or odds ratio, the convention is to label the exposed or treated group 1 and the unexposed or control group 2. For example, suppose a study is designed to assess whether there is a significant difference in proportions in two independent comparison groups. The test of interest is as follows: H 0 : p 1 = p 2 versus H 1 : p 1 ≠ p 2 . The following are the hypothesis for testing for a difference in proportions using the risk difference, the risk ratio and the odds ratio. First, the hypotheses above are equivalent to the following: - For the risk difference, H 0 : p 1 - p 2 = 0 versus H 1 : p 1 - p 2 ≠ 0 which are, by definition, equal to H 0 : RD = 0 versus H 1 : RD ≠ 0.
- If an investigator wants to focus on the risk ratio, the equivalent hypotheses are H 0 : RR = 1 versus H 1 : RR ≠ 1.
- If the investigator wants to focus on the odds ratio, the equivalent hypotheses are H 0 : OR = 1 versus H 1 : OR ≠ 1.
Suppose a test is performed to test H 0 : RD = 0 versus H 1 : RD ≠ 0 and the test rejects H 0 at α=0.05. Based on this test we can conclude that there is significant evidence, α=0.05, of a difference in proportions, significant evidence that the risk difference is not zero, significant evidence that the risk ratio and odds ratio are not one. The risk difference is analogous to the difference in means when the outcome is continuous. Here the parameter of interest is the difference in proportions in the population, RD = p 1 -p 2 and the null value for the risk difference is zero. In a test of hypothesis for the risk difference, the null hypothesis is always H 0 : RD = 0. This is equivalent to H 0 : RR = 1 and H 0 : OR = 1. In the research hypothesis, an investigator can hypothesize that the first proportion is larger than the second (H 1 : p 1 > p 2 , which is equivalent to H 1 : RD > 0, H 1 : RR > 1 and H 1 : OR > 1), that the first proportion is smaller than the second (H 1 : p 1 < p 2 , which is equivalent to H 1 : RD < 0, H 1 : RR < 1 and H 1 : OR < 1), or that the proportions are different (H 1 : p 1 ≠ p 2 , which is equivalent to H 1 : RD ≠ 0, H 1 : RR ≠ 1 and H 1 : OR ≠ 1). The three different alternatives represent upper-, lower- and two-tailed tests, respectively. The formula for the test of hypothesis for the difference in proportions is given below. Test Statistics for Testing H 0 : p 1 = p The formula above is appropriate for large samples, defined as at least 5 successes (np > 5) and at least 5 failures (n(1-p > 5)) in each of the two samples. If there are fewer than 5 successes or failures in either comparison group, then alternative procedures, called exact methods must be used to estimate the difference in population proportions. The following table summarizes data from n=3,799 participants who attended the fifth examination of the Offspring in the Framingham Heart Study. The outcome of interest is prevalent CVD and we want to test whether the prevalence of CVD is significantly higher in smokers as compared to non-smokers. | Free of CVD | History of CVD | Total | Non-Smoker | 2,757 | 298 | 3,055 | Current Smoker | 663 | 81 | 744 | Total | 3,420 | 379 | 3,799 | The prevalence of CVD (or proportion of participants with prevalent CVD) among non-smokers is 298/3,055 = 0.0975 and the prevalence of CVD among current smokers is 81/744 = 0.1089. Here smoking status defines the comparison groups and we will call the current smokers group 1 (exposed) and the non-smokers (unexposed) group 2. The test of hypothesis is conducted below using the five step approach. H 0 : p 1 = p 2 H 1 : p 1 ≠ p 2 α=0.05 - Step 2. Select the appropriate test statistic.
We must first check that the sample size is adequate. Specifically, we need to ensure that we have at least 5 successes and 5 failures in each comparison group. In this example, we have more than enough successes (cases of prevalent CVD) and failures (persons free of CVD) in each comparison group. The sample size is more than adequate so the following formula can be used: Reject H 0 if Z < -1.960 or if Z > 1.960. We now substitute the sample data into the formula for the test statistic identified in Step 2. We first compute the overall proportion of successes: We now substitute to compute the test statistic. We do not reject H 0 because -1.960 < 0.927 < 1.960. We do not have statistically significant evidence at α=0.05 to show that there is a difference in prevalent CVD between smokers and non-smokers. A 95% confidence interval for the difference in prevalent CVD (or risk difference) between smokers and non-smokers as 0.0114 + 0.0247, or between -0.0133 and 0.0361. Because the 95% confidence interval for the risk difference includes zero we again conclude that there is no statistically significant difference in prevalent CVD between smokers and non-smokers. Smoking has been shown over and over to be a risk factor for cardiovascular disease. What might explain the fact that we did not observe a statistically significant difference using data from the Framingham Heart Study? HINT: Here we consider prevalent CVD, would the results have been different if we considered incident CVD? A randomized trial is designed to evaluate the effectiveness of a newly developed pain reliever designed to reduce pain in patients following joint replacement surgery. The trial compares the new pain reliever to the pain reliever currently in use (called the standard of care). A total of 100 patients undergoing joint replacement surgery agreed to participate in the trial. Patients were randomly assigned to receive either the new pain reliever or the standard pain reliever following surgery and were blind to the treatment assignment. Before receiving the assigned treatment, patients were asked to rate their pain on a scale of 0-10 with higher scores indicative of more pain. Each patient was then given the assigned treatment and after 30 minutes was again asked to rate their pain on the same scale. The primary outcome was a reduction in pain of 3 or more scale points (defined by clinicians as a clinically meaningful reduction). The following data were observed in the trial. | | | | New Pain Reliever | 50 | 23 | 0.46 | Standard Pain Reliever | 50 | 11 | 0.22 | We now test whether there is a statistically significant difference in the proportions of patients reporting a meaningful reduction (i.e., a reduction of 3 or more scale points) using the five step approach. H 0 : p 1 = p 2 H 1 : p 1 ≠ p 2 α=0.05 Here the new or experimental pain reliever is group 1 and the standard pain reliever is group 2. We must first check that the sample size is adequate. Specifically, we need to ensure that we have at least 5 successes and 5 failures in each comparison group, i.e., In this example, we have min(50(0.46), 50(1-0.46), 50(0.22), 50(1-0.22)) = min(23, 27, 11, 39) = 11. The sample size is adequate so the following formula can be used We reject H 0 because 2.526 > 1960. We have statistically significant evidence at a =0.05 to show that there is a difference in the proportions of patients on the new pain reliever reporting a meaningful reduction (i.e., a reduction of 3 or more scale points) as compared to patients on the standard pain reliever. A 95% confidence interval for the difference in proportions of patients on the new pain reliever reporting a meaningful reduction (i.e., a reduction of 3 or more scale points) as compared to patients on the standard pain reliever is 0.24 + 0.18 or between 0.06 and 0.42. Because the 95% confidence interval does not include zero we concluded that there was a statistically significant difference in proportions which is consistent with the test of hypothesis result. Again, the procedures discussed here apply to applications where there are two independent comparison groups and a dichotomous outcome. There are other applications in which it is of interest to compare a dichotomous outcome in matched or paired samples. For example, in a clinical trial we might wish to test the effectiveness of a new antibiotic eye drop for the treatment of bacterial conjunctivitis. Participants use the new antibiotic eye drop in one eye and a comparator (placebo or active control treatment) in the other. The success of the treatment (yes/no) is recorded for each participant for each eye. Because the two assessments (success or failure) are paired, we cannot use the procedures discussed here. The appropriate test is called McNemar's test (sometimes called McNemar's test for dependent proportions). Vide0 - Hypothesis Testing With Two Independent Samples and a Dichotomous Outcome (2:55) Here we presented hypothesis testing techniques for means and proportions in one and two sample situations. Tests of hypothesis involve several steps, including specifying the null and alternative or research hypothesis, selecting and computing an appropriate test statistic, setting up a decision rule and drawing a conclusion. There are many details to consider in hypothesis testing. The first is to determine the appropriate test. We discussed Z and t tests here for different applications. The appropriate test depends on the distribution of the outcome variable (continuous or dichotomous), the number of comparison groups (one, two) and whether the comparison groups are independent or dependent. The following table summarizes the different tests of hypothesis discussed here. - Continuous Outcome, One Sample: H0: μ = μ0
- Continuous Outcome, Two Independent Samples: H0: μ1 = μ2
- Continuous Outcome, Two Matched Samples: H0: μd = 0
- Dichotomous Outcome, One Sample: H0: p = p 0
- Dichotomous Outcome, Two Independent Samples: H0: p1 = p2, RD=0, RR=1, OR=1
Once the type of test is determined, the details of the test must be specified. Specifically, the null and alternative hypotheses must be clearly stated. The null hypothesis always reflects the "no change" or "no difference" situation. The alternative or research hypothesis reflects the investigator's belief. The investigator might hypothesize that a parameter (e.g., a mean, proportion, difference in means or proportions) will increase, will decrease or will be different under specific conditions (sometimes the conditions are different experimental conditions and other times the conditions are simply different groups of participants). Once the hypotheses are specified, data are collected and summarized. The appropriate test is then conducted according to the five step approach. If the test leads to rejection of the null hypothesis, an approximate p-value is computed to summarize the significance of the findings. When tests of hypothesis are conducted using statistical computing packages, exact p-values are computed. Because the statistical tables in this textbook are limited, we can only approximate p-values. If the test fails to reject the null hypothesis, then a weaker concluding statement is made for the following reason. In hypothesis testing, there are two types of errors that can be committed. A Type I error occurs when a test incorrectly rejects the null hypothesis. This is referred to as a false positive result, and the probability that this occurs is equal to the level of significance, α. The investigator chooses the level of significance in Step 1, and purposely chooses a small value such as α=0.05 to control the probability of committing a Type I error. A Type II error occurs when a test fails to reject the null hypothesis when in fact it is false. The probability that this occurs is equal to β. Unfortunately, the investigator cannot specify β at the outset because it depends on several factors including the sample size (smaller samples have higher b), the level of significance (β decreases as a increases), and the difference in the parameter under the null and alternative hypothesis. We noted in several examples in this chapter, the relationship between confidence intervals and tests of hypothesis. The approaches are different, yet related. It is possible to draw a conclusion about statistical significance by examining a confidence interval. For example, if a 95% confidence interval does not contain the null value (e.g., zero when analyzing a mean difference or risk difference, one when analyzing relative risks or odds ratios), then one can conclude that a two-sided test of hypothesis would reject the null at α=0.05. It is important to note that the correspondence between a confidence interval and test of hypothesis relates to a two-sided test and that the confidence level corresponds to a specific level of significance (e.g., 95% to α=0.05, 90% to α=0.10 and so on). The exact significance of the test, the p-value, can only be determined using the hypothesis testing approach and the p-value provides an assessment of the strength of the evidence and not an estimate of the effect. Answers to Selected ProblemsDental services problem - bottom of page 5. - Step 1: Set up hypotheses and determine the level of significance.
α=0.05 - Step 2: Select the appropriate test statistic.
First, determine whether the sample size is adequate. Therefore the sample size is adequate, and we can use the following formula: - Step 3: Set up the decision rule.
Reject H0 if Z is less than or equal to -1.96 or if Z is greater than or equal to 1.96. - Step 4: Compute the test statistic
- Step 5: Conclusion.
We reject the null hypothesis because -6.15<-1.96. Therefore there is a statistically significant difference in the proportion of children in Boston using dental services compated to the national proportion. 10.5 Hypothesis Testing for Two Means and Two ProportionsHypothesis testing for two means and two proportions. Class Time: Student Learning Outcomes - The student will select the appropriate distributions to use in each case.
- The student will conduct hypothesis tests and interpret the results.
- the business section from two consecutive days’ newspapers
- three small packages of M&Ms®
- five small packages of Reese's Pieces®
Increasing Stocks Survey Look at yesterday’s newspaper business section. Conduct a hypothesis test to determine if the proportion of New York Stock Exchange (NYSE) stocks that increased is greater than the proportion of NASDAQ stocks that increased. As randomly as possible, choose 40 NYSE stocks, and 32 NASDAQ stocks and complete the following statements. - H 0 : _________
- H a : _________
- In words, define the random variable.
- The distribution to use for the test is _____________.
- Calculate the test statistic using your data.
- Calculate the p -value.
- Do you reject or not reject the null hypothesis? Why?
- Write a clear conclusion using a complete sentence.
Decreasing Stocks Survey Randomly pick eight stocks from the newspaper. Using two consecutive days’ business sections, test whether the stocks went down, on average, for the second day. - H 0 : ________
- H a : ________
- Calculate the p -value:
Candy Survey Buy three small packages of M&Ms and five small packages of Reese's Pieces (same net weight as the M&Ms). Test whether or not the mean number of candy pieces per package is the same for the two brands. - What distribution should be used for this test?
Shoe Survey Test whether women have, on average, more pairs of shoes than men. Include all forms of sneakers, shoes, sandals, and boots. Use your class as the sample. - The distribution to use for the test is ________________.
This book may not be used in the training of large language models or otherwise be ingested into large language models or generative AI offerings without OpenStax's permission. Want to cite, share, or modify this book? This book uses the Creative Commons Attribution License and you must attribute OpenStax. Access for free at https://openstax.org/books/introductory-statistics/pages/1-introduction - Authors: Barbara Illowsky, Susan Dean
- Publisher/website: OpenStax
- Book title: Introductory Statistics
- Publication date: Sep 19, 2013
- Location: Houston, Texas
- Book URL: https://openstax.org/books/introductory-statistics/pages/1-introduction
- Section URL: https://openstax.org/books/introductory-statistics/pages/10-5-hypothesis-testing-for-two-means-and-two-proportions
© Jun 23, 2022 OpenStax. Textbook content produced by OpenStax is licensed under a Creative Commons Attribution License . The OpenStax name, OpenStax logo, OpenStax book covers, OpenStax CNX name, and OpenStax CNX logo are not subject to the Creative Commons license and may not be reproduced without the prior and express written consent of Rice University. Module 10: Inference for Means Hypothesis Test for a Difference in Two Population Means (1 of 2)Learning outcomes. - Under appropriate conditions, conduct a hypothesis test about a difference between two population means. State a conclusion in context.
Using the Hypothesis Test for a Difference in Two Population MeansThe general steps of this hypothesis test are the same as always. As expected, the details of the conditions for use of the test and the test statistic are unique to this test (but similar in many ways to what we have seen before.) Step 1: Determine the hypotheses.The hypotheses for a difference in two population means are similar to those for a difference in two population proportions. The null hypothesis, H 0 , is again a statement of “no effect” or “no difference.” - H 0 : μ 1 – μ 2 = 0, which is the same as H 0 : μ 1 = μ 2
The alternative hypothesis, H a , can be any one of the following. - H a : μ 1 – μ 2 < 0, which is the same as H a : μ 1 < μ 2
- H a : μ 1 – μ 2 > 0, which is the same as H a : μ 1 > μ 2
- H a : μ 1 – μ 2 ≠ 0, which is the same as H a : μ 1 ≠ μ 2
Step 2: Collect the data.As usual, how we collect the data determines whether we can use it in the inference procedure. We have our usual two requirements for data collection. - Samples must be random to remove or minimize bias.
- Samples must be representative of the populations in question.
We use this hypothesis test when the data meets the following conditions. - The two random samples are independent .
- The variable is normally distributed in both populations . If this variable is not known, samples of more than 30 will have a difference in sample means that can be modeled adequately by the t-distribution. As we discussed in “Hypothesis Test for a Population Mean,” t-procedures are robust even when the variable is not normally distributed in the population. If checking normality in the populations is impossible, then we look at the distribution in the samples. If a histogram or dotplot of the data does not show extreme skew or outliers, we take it as a sign that the variable is not heavily skewed in the populations, and we use the inference procedure. (Note: This is the same condition we used for the one-sample t-test in “Hypothesis Test for a Population Mean.”)
Step 3: Assess the evidence. If the conditions are met, then we calculate the t-test statistic. The t-test statistic has a familiar form. [latex]T=\frac{Observeddifferenceinsamplemeans-Hypothesizeddiferenceinpopulationmeans}{ standarderror}[/latex] [latex]T=\frac{(\bar{x}_{1}-\bar{x}_{2})-(\mu_{1}-\mu_{2})}{\sqrt{\frac{s_{1}^{2}}{n_{1}}}+\frac{s_{2}^{2}}{n_{2}}}[/latex] Since the null hypothesis assumes there is no difference in the population means, the expression (μ 1 – μ 2 ) is always zero. As we learned in “Estimating a Population Mean,” the t-distribution depends on the degrees of freedom (df) . In the one-sample and matched-pair cases df = n – 1. For the two-sample t-test, determining the correct df is based on a complicated formula that we do not cover in this course. We will either give the df or use technology to find the df . With the t-test statistic and the degrees of freedom, we can use the appropriate t-model to find the P-value, just as we did in “Hypothesis Test for a Population Mean.” We can even use the same simulation. Step 4: State a conclusion. To state a conclusion, we follow what we have done with other hypothesis tests. We compare our P-value to a stated level of significance. - If the P-value ≤ α, we reject the null hypothesis in favor of the alternative hypothesis.
- If the P-value > α, we fail to reject the null hypothesis. We do not have enough evidence to support the alternative hypothesis.
As always, we state our conclusion in context, usually by referring to the alternative hypothesis. “Context and Calories”Does the company you keep impact what you eat? This example comes from an article titled “Impact of Group Settings and Gender on Meals Purchased by College Students” (Allen-O’Donnell, M., T. C. Nowak, K. A. Snyder, and M. D. Cottingham, Journal of Applied Social Psychology 49(9), 2011, onlinelibrary.wiley.com/doi/10.1111/j.1559-1816.2011.00804.x/full) . In this study, researchers examined this issue in the context of gender-related theories in their field. For our purposes, we look at this research more narrowly. Step 1: Stating the hypotheses. In the article, the authors make the following hypothesis. “The attempt to appear feminine will be empirically demonstrated by the purchase of fewer calories by women in mixed-gender groups than by women in same-gender groups.” We translate this into a simpler and narrower research question: Do women purchase fewer calories when they eat with men compared to when they eat with women? Here the two populations are “women eating with women” (population 1) and “women eating with men” (population 2). The variable is the calories in the meal. We test the following hypotheses at the 5% level of significance. The null hypothesis is always H 0 : μ 1 – μ 2 = 0, which is the same as H 0 : μ 1 = μ 2 . The alternative hypothesis H a : μ 1 – μ 2 > 0, which is the same as H a : μ 1 > μ 2 . Here μ 1 represents the mean number of calories ordered by women when they were eating with other women, and μ 2 represents the mean number of calories ordered by women when they were eating with men. Note: It does not matter which population we label as 1 or 2, but once we decide, we have to stay consistent throughout the hypothesis test. Since we expect the number of calories to be greater for the women eating with other women, the difference is positive if “women eating with women” is population 1. If you prefer to work with positive numbers, choose the group with the larger expected mean as population 1. This is a good general tip. Step 2: Collect Data. As usual, there are two major things to keep in mind when considering the collection of data. - Samples need to be representative of the population in question.
- Samples need to be random in order to remove or minimize bias.
Representative Samples? The researchers state their hypothesis in terms of “women.” We did the same. But the researchers gathered data by watching people eat at the HUB Rock Café II on the campus of Indiana University of Pennsylvania during the Spring semester of 2006. Almost all of the women in the data set were white undergraduates between the ages of 18 and 24, so there are some definite limitations on the scope of this study. These limitations will affect our conclusion (and the specific definition of the population means in our hypotheses.) Random Samples? The observations were collected on February 13, 2006, through February 22, 2006, between 11 a.m. and 7 p.m. We can see that the researchers included both lunch and dinner. They also made observations on all days of the week to ensure that weekly customer patterns did not confound their findings. The authors state that “since the time period for observations and the place where [they] observed students were limited, the sample was a convenience sample.” Despite these limitations, the researchers conducted inference procedures with the data, and the results were published in a reputable journal. We will also conduct inference with this data, but we also include a discussion of the limitations of the study with our conclusion. The authors did this, also. Do the data meet the conditions for use of a t-test? The researchers reported the following sample statistics. - In a sample of 45 women dining with other women, the average number of calories ordered was 850, and the standard deviation was 252.
- In a sample of 27 women dining with men, the average number of calories ordered was 719, and the standard deviation was 322.
One of the samples has fewer than 30 women. We need to make sure the distribution of calories in this sample is not heavily skewed and has no outliers, but we do not have access to a spreadsheet of the actual data. Since the researchers conducted a t-test with this data, we will assume that the conditions are met. This includes the assumption that the samples are independent. As noted previously, the researchers reported the following sample statistics. To compute the t-test statistic, make sure sample 1 corresponds to population 1. Here our population 1 is “women eating with other women.” So x 1 = 850, s 1 = 252, n 1 =45, and so on. [latex]T=\frac{\bar{x}_{1}-\bar{x}_{2}}{\sqrt{\frac{s_{1}^{2}}{n_{1}}}+\frac{s_{2}^{2}}{n_{2}}}= \frac{850-719}{\sqrt{\frac{252^{2}}{45}+\frac{322^{2}}{27}}}\approx \frac{131}{72.47}\approx 1.81[/latex] Using technology, we determined that the degrees of freedom are about 45 for this data. To find the P-value, we use our familiar simulation of the t-distribution. Since the alternative hypothesis is a “greater than” statement, we look for the area to the right of T = 1.81. The P-value is 0.0385. ![hypothesis testing for 2 means The green area to the left of the t value = 0.9615. The blue area to the right of the T value = 0.0385.](https://pressbooks.cuny.edu/app/uploads/sites/126/2022/11/m10_inference_mean_topic_10_4_m10_hypo_test_diff_two_pop_prop_1_image18.png) Generic Conclusion The hypotheses for this test are H 0 : μ 1 – μ 2 = 0 and H a : μ 1 – μ 2 > 0. Since the P-value is less than the significance level (0.0385 < 0.05), we reject H 0 and accept H a . Conclusion in context At Indiana University of Pennsylvania, the mean number of calories ordered by undergraduate women eating with other women is greater than the mean number of calories ordered by undergraduate women eating with men (P-value = 0.0385). Comment about ConclusionsIn the conclusion above, we did not generalize the findings to all women. Since the samples included only undergraduate women at one university, we included this information in our conclusion. But our conclusion is a cautious statement of the findings. The authors see the results more broadly in the context of theories in the field of social psychology. In the context of these theories, they write, “Our findings support the assertion that meal size is a tool for influencing the impressions of others. For traditional-age, predominantly White college women, diminished meal size appears to be an attempt to assert femininity in groups that include men.” This viewpoint is echoed in the following summary of the study for the general public on National Public Radio (npr.org). - Both men and women appear to choose larger portions when they eat with women, and both men and women choose smaller portions when they eat in the company of men, according to new research published in the Journal of Applied Social Psychology . The study, conducted among a sample of 127 college students, suggests that both men and women are influenced by unconscious scripts about how to behave in each other’s company. And these scripts change the way men and women eat when they eat together and when they eat apart.
Should we be concerned that the findings of this study are generalized in this way? Perhaps. But the authors of the article address this concern by including the following disclaimer with their findings: “While the results of our research are suggestive, they should be replicated with larger, representative samples. Studies should be done not only with primarily White, middle-class college students, but also with students who differ in terms of race/ethnicity, social class, age, sexual orientation, and so forth.” This is an example of good statistical practice. It is often very difficult to select truly random samples from the populations of interest. Researchers therefore discuss the limitations of their sampling design when they discuss their conclusions. In the following activities, you will have the opportunity to practice parts of the hypothesis test for a difference in two population means. On the next page, the activities focus on the entire process and also incorporate technology. National Health and Nutrition Survey- Concepts in Statistics. Provided by : Open Learning Initiative. Located at : http://oli.cmu.edu . License : CC BY: Attribution
Concepts in Statistics Copyright © 2023 by CUNY School of Professional Studies is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License , except where otherwise noted. Share This BookHypothesis TestingHypothesis testing is a tool for making statistical inferences about the population data. It is an analysis tool that tests assumptions and determines how likely something is within a given standard of accuracy. Hypothesis testing provides a way to verify whether the results of an experiment are valid. A null hypothesis and an alternative hypothesis are set up before performing the hypothesis testing. This helps to arrive at a conclusion regarding the sample obtained from the population. In this article, we will learn more about hypothesis testing, its types, steps to perform the testing, and associated examples. What is Hypothesis Testing in Statistics?Hypothesis testing uses sample data from the population to draw useful conclusions regarding the population probability distribution . It tests an assumption made about the data using different types of hypothesis testing methodologies. The hypothesis testing results in either rejecting or not rejecting the null hypothesis. Hypothesis Testing DefinitionHypothesis testing can be defined as a statistical tool that is used to identify if the results of an experiment are meaningful or not. It involves setting up a null hypothesis and an alternative hypothesis. These two hypotheses will always be mutually exclusive. This means that if the null hypothesis is true then the alternative hypothesis is false and vice versa. An example of hypothesis testing is setting up a test to check if a new medicine works on a disease in a more efficient manner. Null HypothesisThe null hypothesis is a concise mathematical statement that is used to indicate that there is no difference between two possibilities. In other words, there is no difference between certain characteristics of data. This hypothesis assumes that the outcomes of an experiment are based on chance alone. It is denoted as \(H_{0}\). Hypothesis testing is used to conclude if the null hypothesis can be rejected or not. Suppose an experiment is conducted to check if girls are shorter than boys at the age of 5. The null hypothesis will say that they are the same height. Alternative HypothesisThe alternative hypothesis is an alternative to the null hypothesis. It is used to show that the observations of an experiment are due to some real effect. It indicates that there is a statistical significance between two possible outcomes and can be denoted as \(H_{1}\) or \(H_{a}\). For the above-mentioned example, the alternative hypothesis would be that girls are shorter than boys at the age of 5. Hypothesis Testing P ValueIn hypothesis testing, the p value is used to indicate whether the results obtained after conducting a test are statistically significant or not. It also indicates the probability of making an error in rejecting or not rejecting the null hypothesis.This value is always a number between 0 and 1. The p value is compared to an alpha level, \(\alpha\) or significance level. The alpha level can be defined as the acceptable risk of incorrectly rejecting the null hypothesis. The alpha level is usually chosen between 1% to 5%. Hypothesis Testing Critical regionAll sets of values that lead to rejecting the null hypothesis lie in the critical region. Furthermore, the value that separates the critical region from the non-critical region is known as the critical value. Hypothesis Testing FormulaDepending upon the type of data available and the size, different types of hypothesis testing are used to determine whether the null hypothesis can be rejected or not. The hypothesis testing formula for some important test statistics are given below: - z = \(\frac{\overline{x}-\mu}{\frac{\sigma}{\sqrt{n}}}\). \(\overline{x}\) is the sample mean, \(\mu\) is the population mean, \(\sigma\) is the population standard deviation and n is the size of the sample.
- t = \(\frac{\overline{x}-\mu}{\frac{s}{\sqrt{n}}}\). s is the sample standard deviation.
- \(\chi ^{2} = \sum \frac{(O_{i}-E_{i})^{2}}{E_{i}}\). \(O_{i}\) is the observed value and \(E_{i}\) is the expected value.
We will learn more about these test statistics in the upcoming section. Types of Hypothesis TestingSelecting the correct test for performing hypothesis testing can be confusing. These tests are used to determine a test statistic on the basis of which the null hypothesis can either be rejected or not rejected. Some of the important tests used for hypothesis testing are given below. Hypothesis Testing Z TestA z test is a way of hypothesis testing that is used for a large sample size (n ≥ 30). It is used to determine whether there is a difference between the population mean and the sample mean when the population standard deviation is known. It can also be used to compare the mean of two samples. It is used to compute the z test statistic. The formulas are given as follows: - One sample: z = \(\frac{\overline{x}-\mu}{\frac{\sigma}{\sqrt{n}}}\).
- Two samples: z = \(\frac{(\overline{x_{1}}-\overline{x_{2}})-(\mu_{1}-\mu_{2})}{\sqrt{\frac{\sigma_{1}^{2}}{n_{1}}+\frac{\sigma_{2}^{2}}{n_{2}}}}\).
Hypothesis Testing t TestThe t test is another method of hypothesis testing that is used for a small sample size (n < 30). It is also used to compare the sample mean and population mean. However, the population standard deviation is not known. Instead, the sample standard deviation is known. The mean of two samples can also be compared using the t test. - One sample: t = \(\frac{\overline{x}-\mu}{\frac{s}{\sqrt{n}}}\).
- Two samples: t = \(\frac{(\overline{x_{1}}-\overline{x_{2}})-(\mu_{1}-\mu_{2})}{\sqrt{\frac{s_{1}^{2}}{n_{1}}+\frac{s_{2}^{2}}{n_{2}}}}\).
Hypothesis Testing Chi SquareThe Chi square test is a hypothesis testing method that is used to check whether the variables in a population are independent or not. It is used when the test statistic is chi-squared distributed. One Tailed Hypothesis TestingOne tailed hypothesis testing is done when the rejection region is only in one direction. It can also be known as directional hypothesis testing because the effects can be tested in one direction only. This type of testing is further classified into the right tailed test and left tailed test. Right Tailed Hypothesis Testing The right tail test is also known as the upper tail test. This test is used to check whether the population parameter is greater than some value. The null and alternative hypotheses for this test are given as follows: \(H_{0}\): The population parameter is ≤ some value \(H_{1}\): The population parameter is > some value. If the test statistic has a greater value than the critical value then the null hypothesis is rejected ![hypothesis testing for 2 means Right Tail Hypothesis Testing](https://d138zd1ktt9iqe.cloudfront.net/media/seo_landing_files/right-tail-hypothesis-testing-1640062470.png) Left Tailed Hypothesis Testing The left tail test is also known as the lower tail test. It is used to check whether the population parameter is less than some value. The hypotheses for this hypothesis testing can be written as follows: \(H_{0}\): The population parameter is ≥ some value \(H_{1}\): The population parameter is < some value. The null hypothesis is rejected if the test statistic has a value lesser than the critical value. ![hypothesis testing for 2 means Left Tail Hypothesis Testing](https://d138zd1ktt9iqe.cloudfront.net/media/seo_landing_files/left-tail-hypothesis-testing-1640062493.png) Two Tailed Hypothesis TestingIn this hypothesis testing method, the critical region lies on both sides of the sampling distribution. It is also known as a non - directional hypothesis testing method. The two-tailed test is used when it needs to be determined if the population parameter is assumed to be different than some value. The hypotheses can be set up as follows: \(H_{0}\): the population parameter = some value \(H_{1}\): the population parameter ≠ some value The null hypothesis is rejected if the test statistic has a value that is not equal to the critical value. ![hypothesis testing for 2 means Two Tail Hypothesis Testing](https://d138zd1ktt9iqe.cloudfront.net/media/seo_landing_files/two-tail-hypothesis-testing-1640062523.png) Hypothesis Testing StepsHypothesis testing can be easily performed in five simple steps. The most important step is to correctly set up the hypotheses and identify the right method for hypothesis testing. The basic steps to perform hypothesis testing are as follows: - Step 1: Set up the null hypothesis by correctly identifying whether it is the left-tailed, right-tailed, or two-tailed hypothesis testing.
- Step 2: Set up the alternative hypothesis.
- Step 3: Choose the correct significance level, \(\alpha\), and find the critical value.
- Step 4: Calculate the correct test statistic (z, t or \(\chi\)) and p-value.
- Step 5: Compare the test statistic with the critical value or compare the p-value with \(\alpha\) to arrive at a conclusion. In other words, decide if the null hypothesis is to be rejected or not.
Hypothesis Testing ExampleThe best way to solve a problem on hypothesis testing is by applying the 5 steps mentioned in the previous section. Suppose a researcher claims that the mean average weight of men is greater than 100kgs with a standard deviation of 15kgs. 30 men are chosen with an average weight of 112.5 Kgs. Using hypothesis testing, check if there is enough evidence to support the researcher's claim. The confidence interval is given as 95%. Step 1: This is an example of a right-tailed test. Set up the null hypothesis as \(H_{0}\): \(\mu\) = 100. Step 2: The alternative hypothesis is given by \(H_{1}\): \(\mu\) > 100. Step 3: As this is a one-tailed test, \(\alpha\) = 100% - 95% = 5%. This can be used to determine the critical value. 1 - \(\alpha\) = 1 - 0.05 = 0.95 0.95 gives the required area under the curve. Now using a normal distribution table, the area 0.95 is at z = 1.645. A similar process can be followed for a t-test. The only additional requirement is to calculate the degrees of freedom given by n - 1. Step 4: Calculate the z test statistic. This is because the sample size is 30. Furthermore, the sample and population means are known along with the standard deviation. z = \(\frac{\overline{x}-\mu}{\frac{\sigma}{\sqrt{n}}}\). \(\mu\) = 100, \(\overline{x}\) = 112.5, n = 30, \(\sigma\) = 15 z = \(\frac{112.5-100}{\frac{15}{\sqrt{30}}}\) = 4.56 Step 5: Conclusion. As 4.56 > 1.645 thus, the null hypothesis can be rejected. Hypothesis Testing and Confidence IntervalsConfidence intervals form an important part of hypothesis testing. This is because the alpha level can be determined from a given confidence interval. Suppose a confidence interval is given as 95%. Subtract the confidence interval from 100%. This gives 100 - 95 = 5% or 0.05. This is the alpha value of a one-tailed hypothesis testing. To obtain the alpha value for a two-tailed hypothesis testing, divide this value by 2. This gives 0.05 / 2 = 0.025. Related Articles: - Probability and Statistics
- Data Handling
Important Notes on Hypothesis Testing - Hypothesis testing is a technique that is used to verify whether the results of an experiment are statistically significant.
- It involves the setting up of a null hypothesis and an alternate hypothesis.
- There are three types of tests that can be conducted under hypothesis testing - z test, t test, and chi square test.
- Hypothesis testing can be classified as right tail, left tail, and two tail tests.
![](//sektorel.online/777/templates/cheerup/res/banner1.gif) Examples on Hypothesis Testing- Example 1: The average weight of a dumbbell in a gym is 90lbs. However, a physical trainer believes that the average weight might be higher. A random sample of 5 dumbbells with an average weight of 110lbs and a standard deviation of 18lbs. Using hypothesis testing check if the physical trainer's claim can be supported for a 95% confidence level. Solution: As the sample size is lesser than 30, the t-test is used. \(H_{0}\): \(\mu\) = 90, \(H_{1}\): \(\mu\) > 90 \(\overline{x}\) = 110, \(\mu\) = 90, n = 5, s = 18. \(\alpha\) = 0.05 Using the t-distribution table, the critical value is 2.132 t = \(\frac{\overline{x}-\mu}{\frac{s}{\sqrt{n}}}\) t = 2.484 As 2.484 > 2.132, the null hypothesis is rejected. Answer: The average weight of the dumbbells may be greater than 90lbs
- Example 2: The average score on a test is 80 with a standard deviation of 10. With a new teaching curriculum introduced it is believed that this score will change. On random testing, the score of 38 students, the mean was found to be 88. With a 0.05 significance level, is there any evidence to support this claim? Solution: This is an example of two-tail hypothesis testing. The z test will be used. \(H_{0}\): \(\mu\) = 80, \(H_{1}\): \(\mu\) ≠ 80 \(\overline{x}\) = 88, \(\mu\) = 80, n = 36, \(\sigma\) = 10. \(\alpha\) = 0.05 / 2 = 0.025 The critical value using the normal distribution table is 1.96 z = \(\frac{\overline{x}-\mu}{\frac{\sigma}{\sqrt{n}}}\) z = \(\frac{88-80}{\frac{10}{\sqrt{36}}}\) = 4.8 As 4.8 > 1.96, the null hypothesis is rejected. Answer: There is a difference in the scores after the new curriculum was introduced.
- Example 3: The average score of a class is 90. However, a teacher believes that the average score might be lower. The scores of 6 students were randomly measured. The mean was 82 with a standard deviation of 18. With a 0.05 significance level use hypothesis testing to check if this claim is true. Solution: The t test will be used. \(H_{0}\): \(\mu\) = 90, \(H_{1}\): \(\mu\) < 90 \(\overline{x}\) = 110, \(\mu\) = 90, n = 6, s = 18 The critical value from the t table is -2.015 t = \(\frac{\overline{x}-\mu}{\frac{s}{\sqrt{n}}}\) t = \(\frac{82-90}{\frac{18}{\sqrt{6}}}\) t = -1.088 As -1.088 > -2.015, we fail to reject the null hypothesis. Answer: There is not enough evidence to support the claim.
go to slide go to slide go to slide ![hypothesis testing for 2 means hypothesis testing for 2 means](https://d138zd1ktt9iqe.cloudfront.net/media/seo_landing_files/add-caucasian-kid-and-caucasian-teacher-grade-4-7-1619248030.png) Book a Free Trial Class FAQs on Hypothesis TestingWhat is hypothesis testing. Hypothesis testing in statistics is a tool that is used to make inferences about the population data. It is also used to check if the results of an experiment are valid. What is the z Test in Hypothesis Testing?The z test in hypothesis testing is used to find the z test statistic for normally distributed data . The z test is used when the standard deviation of the population is known and the sample size is greater than or equal to 30. What is the t Test in Hypothesis Testing?The t test in hypothesis testing is used when the data follows a student t distribution . It is used when the sample size is less than 30 and standard deviation of the population is not known. What is the formula for z test in Hypothesis Testing?The formula for a one sample z test in hypothesis testing is z = \(\frac{\overline{x}-\mu}{\frac{\sigma}{\sqrt{n}}}\) and for two samples is z = \(\frac{(\overline{x_{1}}-\overline{x_{2}})-(\mu_{1}-\mu_{2})}{\sqrt{\frac{\sigma_{1}^{2}}{n_{1}}+\frac{\sigma_{2}^{2}}{n_{2}}}}\). What is the p Value in Hypothesis Testing?The p value helps to determine if the test results are statistically significant or not. In hypothesis testing, the null hypothesis can either be rejected or not rejected based on the comparison between the p value and the alpha level. What is One Tail Hypothesis Testing?When the rejection region is only on one side of the distribution curve then it is known as one tail hypothesis testing. The right tail test and the left tail test are two types of directional hypothesis testing. What is the Alpha Level in Two Tail Hypothesis Testing?To get the alpha level in a two tail hypothesis testing divide \(\alpha\) by 2. This is done as there are two rejection regions in the curve. Have a language expert improve your writingRun a free plagiarism check in 10 minutes, generate accurate citations for free. - Knowledge Base
- Choosing the Right Statistical Test | Types & Examples
Choosing the Right Statistical Test | Types & ExamplesPublished on January 28, 2020 by Rebecca Bevans . Revised on June 22, 2023. Statistical tests are used in hypothesis testing . They can be used to: - determine whether a predictor variable has a statistically significant relationship with an outcome variable.
- estimate the difference between two or more groups.
Statistical tests assume a null hypothesis of no relationship or no difference between groups. Then they determine whether the observed data fall outside of the range of values predicted by the null hypothesis. If you already know what types of variables you’re dealing with, you can use the flowchart to choose the right statistical test for your data. Statistical tests flowchart Table of contentsWhat does a statistical test do, when to perform a statistical test, choosing a parametric test: regression, comparison, or correlation, choosing a nonparametric test, flowchart: choosing a statistical test, other interesting articles, frequently asked questions about statistical tests. Statistical tests work by calculating a test statistic – a number that describes how much the relationship between variables in your test differs from the null hypothesis of no relationship. It then calculates a p value (probability value). The p -value estimates how likely it is that you would see the difference described by the test statistic if the null hypothesis of no relationship were true. If the value of the test statistic is more extreme than the statistic calculated from the null hypothesis, then you can infer a statistically significant relationship between the predictor and outcome variables. If the value of the test statistic is less extreme than the one calculated from the null hypothesis, then you can infer no statistically significant relationship between the predictor and outcome variables. Receive feedback on language, structure, and formattingProfessional editors proofread and edit your paper by focusing on: - Academic style
- Vague sentences
- Style consistency
See an example ![hypothesis testing for 2 means hypothesis testing for 2 means](https://www.scribbr.com/wp-content/uploads/2018/01/dissertation-proofreading-service.png) You can perform statistical tests on data that have been collected in a statistically valid manner – either through an experiment , or through observations made using probability sampling methods . For a statistical test to be valid , your sample size needs to be large enough to approximate the true distribution of the population being studied. To determine which statistical test to use, you need to know: - whether your data meets certain assumptions.
- the types of variables that you’re dealing with.
Statistical assumptionsStatistical tests make some common assumptions about the data they are testing: - Independence of observations (a.k.a. no autocorrelation): The observations/variables you include in your test are not related (for example, multiple measurements of a single test subject are not independent, while measurements of multiple different test subjects are independent).
- Homogeneity of variance : the variance within each group being compared is similar among all groups. If one group has much more variation than others, it will limit the test’s effectiveness.
- Normality of data : the data follows a normal distribution (a.k.a. a bell curve). This assumption applies only to quantitative data .
If your data do not meet the assumptions of normality or homogeneity of variance, you may be able to perform a nonparametric statistical test , which allows you to make comparisons without any assumptions about the data distribution. If your data do not meet the assumption of independence of observations, you may be able to use a test that accounts for structure in your data (repeated-measures tests or tests that include blocking variables). Types of variablesThe types of variables you have usually determine what type of statistical test you can use. Quantitative variables represent amounts of things (e.g. the number of trees in a forest). Types of quantitative variables include: - Continuous (aka ratio variables): represent measures and can usually be divided into units smaller than one (e.g. 0.75 grams).
- Discrete (aka integer variables): represent counts and usually can’t be divided into units smaller than one (e.g. 1 tree).
Categorical variables represent groupings of things (e.g. the different tree species in a forest). Types of categorical variables include: - Ordinal : represent data with an order (e.g. rankings).
- Nominal : represent group names (e.g. brands or species names).
- Binary : represent data with a yes/no or 1/0 outcome (e.g. win or lose).
Choose the test that fits the types of predictor and outcome variables you have collected (if you are doing an experiment , these are the independent and dependent variables ). Consult the tables below to see which test best matches your variables. Parametric tests usually have stricter requirements than nonparametric tests, and are able to make stronger inferences from the data. They can only be conducted with data that adheres to the common assumptions of statistical tests. The most common types of parametric test include regression tests, comparison tests, and correlation tests. Regression testsRegression tests look for cause-and-effect relationships . They can be used to estimate the effect of one or more continuous variables on another variable. | Predictor variable | Outcome variable | Research question example | | | | What is the effect of income on longevity? | | | | What is the effect of income and minutes of exercise per day on longevity? | Logistic regression | | | What is the effect of drug dosage on the survival of a test subject? | Comparison testsComparison tests look for differences among group means . They can be used to test the effect of a categorical variable on the mean value of some other characteristic. T-tests are used when comparing the means of precisely two groups (e.g., the average heights of men and women). ANOVA and MANOVA tests are used when comparing the means of more than two groups (e.g., the average heights of children, teenagers, and adults). | Predictor variable | Outcome variable | Research question example | Paired t-test | | | What is the effect of two different test prep programs on the average exam scores for students from the same class? | Independent t-test | | | What is the difference in average exam scores for students from two different schools? | ANOVA | | | What is the difference in average pain levels among post-surgical patients given three different painkillers? | MANOVA | | | What is the effect of flower species on petal length, petal width, and stem length? | Correlation testsCorrelation tests check whether variables are related without hypothesizing a cause-and-effect relationship. These can be used to test whether two variables you want to use in (for example) a multiple regression test are autocorrelated. | Variables | Research question example | Pearson’s | | How are latitude and temperature related? | Non-parametric tests don’t make as many assumptions about the data, and are useful when one or more of the common statistical assumptions are violated. However, the inferences they make aren’t as strong as with parametric tests. | Predictor variable | Outcome variable | Use in place of… | Spearman’s | | | | | | | Pearson’s | Sign test | | | One-sample -test | Kruskal–Wallis | | | ANOVA | ANOSIM | | | MANOVA | Wilcoxon Rank-Sum test | | | Independent t-test | Wilcoxon Signed-rank test | | | Paired t-test | Prevent plagiarism. Run a free check.This flowchart helps you choose among parametric tests. For nonparametric alternatives, check the table above. ![hypothesis testing for 2 means Choosing the right statistical test](https://www.scribbr.com/wp-content/uploads//2020/01/flowchart-for-choosing-a-statistical-test-993x1024.png) If you want to know more about statistics , methodology , or research bias , make sure to check out some of our other articles with explanations and examples. - Normal distribution
- Descriptive statistics
- Measures of central tendency
- Correlation coefficient
- Null hypothesis
Methodology - Cluster sampling
- Stratified sampling
- Types of interviews
- Cohort study
- Thematic analysis
Research bias - Implicit bias
- Cognitive bias
- Survivorship bias
- Availability heuristic
- Nonresponse bias
- Regression to the mean
Statistical tests commonly assume that: - the data are normally distributed
- the groups that are being compared have similar variance
- the data are independent
If your data does not meet these assumptions you might still be able to use a nonparametric statistical test , which have fewer requirements but also make weaker inferences. A test statistic is a number calculated by a statistical test . It describes how far your observed data is from the null hypothesis of no relationship between variables or no difference among sample groups. The test statistic tells you how different two or more groups are from the overall population mean , or how different a linear slope is from the slope predicted by a null hypothesis . Different test statistics are used in different statistical tests. Statistical significance is a term used by researchers to state that it is unlikely their observations could have occurred under the null hypothesis of a statistical test . Significance is usually denoted by a p -value , or probability value. Statistical significance is arbitrary – it depends on the threshold, or alpha value, chosen by the researcher. The most common threshold is p < 0.05, which means that the data is likely to occur less than 5% of the time under the null hypothesis . When the p -value falls below the chosen alpha value, then we say the result of the test is statistically significant. Quantitative variables are any variables where the data represent amounts (e.g. height, weight, or age). Categorical variables are any variables where the data represent groups. This includes rankings (e.g. finishing places in a race), classifications (e.g. brands of cereal), and binary outcomes (e.g. coin flips). You need to know what type of variables you are working with to choose the right statistical test for your data and interpret your results . Discrete and continuous variables are two types of quantitative variables : - Discrete variables represent counts (e.g. the number of objects in a collection).
- Continuous variables represent measurable amounts (e.g. water volume or weight).
Cite this Scribbr articleIf you want to cite this source, you can copy and paste the citation or click the “Cite this Scribbr article” button to automatically add the citation to our free Citation Generator. Bevans, R. (2023, June 22). Choosing the Right Statistical Test | Types & Examples. Scribbr. Retrieved August 15, 2024, from https://www.scribbr.com/statistics/statistical-tests/ Is this article helpful?![hypothesis testing for 2 means Rebecca Bevans](https://secure.gravatar.com/avatar/3ce55a4e9f80182c9051e7440818ca20?s=96&d=mm&r=g) Rebecca BevansOther students also liked, hypothesis testing | a step-by-step guide with easy examples, test statistics | definition, interpretation, and examples, normal distribution | examples, formulas, & uses, what is your plagiarism score. User PreferencesContent preview. Arcu felis bibendum ut tristique et egestas quis: - Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
- Duis aute irure dolor in reprehenderit in voluptate
- Excepteur sint occaecat cupidatat non proident
Keyboard Shortcuts5.5 - hypothesis testing for two-sample proportions. We are now going to develop the hypothesis test for the difference of two proportions for independent samples. The hypothesis test follows the same steps as one group. These notes are going to go into a little bit of math and formulas to help demonstrate the logic behind hypothesis testing for two groups. If this starts to get a little confusion, just skim over it for a general understanding! Remember we can rely on the software to do the calculations for us, but it is good to have a basic understanding of the logic! We will use the sampling distribution of \(\hat{p}_1-\hat{p}_2\) as we did for the confidence interval. For a test for two proportions, we are interested in the difference between two groups. If the difference is zero, then they are not different (i.e., they are equal). Therefore, the null hypothesis will always be: \(H_0\colon p_1-p_2=0\) Another way to look at it is \(H_0\colon p_1=p_2\). This is worth stopping to think about. Remember, in hypothesis testing, we assume the null hypothesis is true. In this case, it means that \(p_1\) and \(p_2\) are equal. Under this assumption, then \(\hat{p}_1\) and \(\hat{p}_2\) are both estimating the same proportion. Think of this proportion as \(p^*\). Therefore, the sampling distribution of both proportions, \(\hat{p}_1\) and \(\hat{p}_2\), will, under certain conditions, be approximately normal centered around \(p^*\), with standard error \(\sqrt{\dfrac{p^*(1-p^*)}{n_i}}\), for \(i=1, 2\). We take this into account by finding an estimate for this \(p^*\) using the two-sample proportions. We can calculate an estimate of \(p^*\) using the following formula: \(\hat{p}^*=\dfrac{x_1+x_2}{n_1+n_2}\) This value is the total number in the desired categories \((x_1+x_2)\) from both samples over the total number of sampling units in the combined sample \((n_1+n_2)\). Putting everything together, if we assume \(p_1=p_2\), then the sampling distribution of \(\hat{p}_1-\hat{p}_2\) will be approximately normal with mean 0 and standard error of \(\sqrt{p^*(1-p^*)\left(\frac{1}{n_1}+\frac{1}{n_2}\right)}\), under certain conditions. \(z^*=\dfrac{(\hat{p}_1-\hat{p}_2)-0}{\sqrt{\hat{p}^*(1-\hat{p}^*)\left(\dfrac{1}{n_1}+\dfrac{1}{n_2}\right)}}\) ...will follow a standard normal distribution. Finally, we can develop our hypothesis test for \(p_1-p_2\). Hypothesis Testing for Two-Sample Proportions Conditions : \(n_1\hat{p}_1\), \(n_1(1-\hat{p}_1)\), \(n_2\hat{p}_2\), and \(n_2(1-\hat{p}_2)\) are all greater than five Test Statistic: \(z^*=\dfrac{\hat{p}_1-\hat{p}_2-0}{\sqrt{\hat{p}^*(1-\hat{p}^*)\left(\dfrac{1}{n_1}+\dfrac{1}{n_2}\right)}}\) ...where \(\hat{p}^*=\dfrac{x_1+x_2}{n_1+n_2}\). The critical values, p-values, and decisions will all follow the same steps as those from a hypothesis test for a one-sample proportion. Difference in Means Hypothesis Test CalculatorUse the calculator below to analyze the results of a difference in sample means hypothesis test. Enter your sample means, sample standard deviations, sample sizes, hypothesized difference in means, test type, and significance level to calculate your results. You will find a description of how to conduct a two sample t-test below the calculator. Define the Two Sample t-test | Significance Level | Difference in Means | t-score | | | Probability | | | The Difference Between the Sample Means Under the Null DistributionConducting a hypothesis test for the difference in means. When two populations are related, you can compare them by analyzing the difference between their means. A hypothesis test for the difference in samples means can help you make inferences about the relationships between two population means. Testing for a Difference in MeansFor the results of a hypothesis test to be valid, you should follow these steps: Check Your ConditionsState your hypothesis, determine your analysis plan, analyze your sample, interpret your results. To use the testing procedure described below, you should check the following conditions: - Independence of Samples - Your samples should be collected independently of one another.
- Simple Random Sampling - You should collect your samples with simple random sampling. This type of sampling requires that every occurrence of a value in a population has an equal chance of being selected when taking a sample.
- Normality of Sample Distributions - The sampling distributions for both samples should follow the Normal or a nearly Normal distribution. A sampling distribution will be nearly Normal when the samples are collected independently and when the population distribution is nearly Normal. Generally, the larger the sample size, the more normally distributed the sampling distribution. Additionally, outlier data points can make a distribution less Normal, so if your data contains many outliers, exercise caution when verifying this condition.
You must state a null hypothesis and an alternative hypothesis to conduct an hypothesis test of the difference in means. The null hypothesis is a skeptical claim that you would like to test. The alternative hypothesis represents the alternative claim to the null hypothesis. Your null hypothesis and alternative hypothesis should be stated in one of three mutually exclusive ways listed in the table below. Null Hypothesis | Alternative Hypothesis | Number of Tails | Description | - μ = D | - μ ≠ D | | Tests whether the sample means come from populations with a difference in means equal to D. If D = 0, then tests if the samples come from populations with means that are different from each other. | - μ ≤ D | - μ > D | | Tests whether sample one comes from a population with a mean that is greater than sample two's population mean by a difference of D. If D = 0, then tests if sample one comes from a population with a mean greater than sample two's population mean. | - μ ≥ D | - μ < D | | Tests whether sample one comes from a population with a mean that is less than sample two's population mean by a difference of D. If D = 0, then tests if sample one comes from a population with a mean less than sample two's population mean. | D is the hypothesized difference between the populations' means that you would like to test. Before conducting a hypothesis test, you must determine a reasonable significance level, α, or the probability of rejecting the null hypothesis assuming it is true. The lower your significance level, the more confident you can be of the conclusion of your hypothesis test. Common significance levels are 10%, 5%, and 1%. To evaluate your hypothesis test at the significance level that you set, consider if you are conducting a one or two tail test: - Two-tail tests divide the rejection region, or critical region, evenly above and below the null distribution, i.e. to the tails of the null sampling distribution. For example, in a two-tail test with a 5% significance level, your rejection region would be the upper and lower 2.5% of the null distribution. An alternative hypothesis of μ 1 - μ 2 ≠ D requires a two tail test.
- One-tail tests place the rejection region entirely on one side of the distribution i.e. to the right or left tail of the null distribution. For example, in a one-tail test evaluating if the actual difference in means, D, is above the null distribution with a 5% significance level, your rejection region would be the upper 5% of the null distribution. μ 1 - μ 2 > D and μ 1 - μ 2 < D alternative hypotheses require one-tail tests.
The graphical results section of the calculator above shades rejection regions blue. After checking your conditions, stating your hypothesis, determining your significance level, and collecting your sample, you are ready to analyze your hypothesis. Sample means follow the Normal distribution with the following parameters: - The Difference in the Population Means, D - The true difference in the population means is unknown, but we use the hypothesized difference in the means, D, from the null hypothesis in the calculations.
- The Standard Error, SE - The standard error of the difference in the sample means can be computed as follows: SE = (s 1 2 /n 1 + s 2 2 /n 2 ) (1/2) with s 1 being the standard deviation of sample one, n 1 being the sample size of sample one, s 2 being the standard deviation of sample one, and n 2 being the sample size of sample two. The standard error defines how differences in sample means are expected to vary around the null difference in means sampling distribution given the sample sizes and under the assumption that the null hypothesis is true.
- The Degrees of Freedom, DF - The degrees of freedom calculation can be estimated as the smaller of n 1 - 1 or n 2 - 1. For more accurate results, use the following formula for the degrees of freedom (DF): DF = (s 1 2 /n 1 + s 2 2 /n 2 ) 2 / ((s 1 2 /n 1 ) 2 / (n 1 - 1) + (s 2 2 /n 2 ) 2 / (n 2 - 1))
In a difference in means hypothesis test, we calculate the probability that we would observe the difference in sample means (x̄ 1 - x̄ 2 ), assuming the null hypothesis is true, also known as the p-value . If the p-value is less than the significance level, then we can reject the null hypothesis. You can determine a precise p-value using the calculator above, but we can find an estimate of the p-value manually by calculating the t-score, or t-statistic, as follows: t = (x̄ 1 - x̄ 2 - D) / SE The t-score is a test statistic that tells you how far our observation is from the null hypothesis's difference in means under the null distribution. Using any t-score table, you can look up the probability of observing the results under the null distribution. You will need to look up the t-score for the type of test you are conducting, i.e. one or two tail. A hypothesis test for the difference in means is sometimes known as a two sample mean t-test because of the use of a t-score in analyzing results. The conclusion of a hypothesis test for the difference in means is always either: - Reject the null hypothesis
- Do not reject the null hypothesis
If you reject the null hypothesis, you cannot say that your sample difference in means is the true difference between the means. If you do not reject the null hypothesis, you cannot say that the hypothesized difference in means is true. A hypothesis test is simply a way to look at evidence and conclude if it provides sufficient evidence to reject the null hypothesis. Example: Hypothesis Test for the Difference in Two MeansLet’s say you are a manager at a company that designs batteries for smartphones. One of your engineers believes that she has developed a battery that will last more than two hours longer than your standard battery. Before you can consider if you should replace your standard battery with the new one, you need to test the engineer’s claim. So, you decided to run a difference in means hypothesis test to see if her claim that the new battery will last two hours longer than the standard one is reasonable. You direct your team to run a study. They will take a sample of 100 of the new batteries and compare their performance to 1,000 of the old standard batteries. - Check the conditions - Your test consists of independent samples . Your team collects your samples using simple random sampling , and you have reason to believe that all your batteries' performances are always close to normally distributed . So, the conditions are met to conduct a two sample t-test.
- State Your Hypothesis - Your null hypothesis is that the charge of the new battery lasts at most two hours longer than your standard battery (i.e. μ 1 - μ 2 ≤ 2). Your alternative hypothesis is that the new battery lasts more than two hours longer than the standard battery (i.e. μ 1 - μ 2 > 2).
- Determine Your Analysis Plan - You believe that a 1% significance level is reasonable. As your test is a one-tail test, you will evaluate if the difference in mean charge between the samples would occur at the upper 1% of the null distribution.
- Analyze Your Sample - After collecting your samples (which you do after steps 1-3), you find the new battery sample had a mean charge of 10.4 hours, x̄ 1 , with a 0.8 hour standard deviation, s 1 . Your standard battery sample had a mean charge of 8.2 hours, x̄ 2 , with a standard deviation of 0.2 hours, s 2 . Using the calculator above, you find that a difference in sample means of 2.2 hours [2 = 10.4 – 8.2] would results in a t-score of 2.49 under the null distribution, which translates to a p-value of 0.72%.
- Interpret Your Results - Since your p-value of 0.72% is less than the significance level of 1%, you have sufficient evidence to reject the null hypothesis.
In this example, you found that you can reject your null hypothesis that the new battery design does not result in more than 2 hours of extra battery life. The test does not guarantee that your engineer’s new battery lasts two hours longer than your standard battery, but it does give you strong reason to believe her claim. Pardon Our InterruptionAs you were browsing something about your browser made us think you were a bot. There are a few reasons this might happen: - You've disabled JavaScript in your web browser.
- You're a power user moving through this website with super-human speed.
- You've disabled cookies in your web browser.
- A third-party browser plugin, such as Ghostery or NoScript, is preventing JavaScript from running. Additional information is available in this support article .
To regain access, please make sure that cookies and JavaScript are enabled before reloading the page. ![hypothesis testing for 2 means Jaro-Education-15-Years](https://jaro-website.s3.ap-south-1.amazonaws.com/2022/03/Jaro-Education-15-Years.png) Know It All About Hypothesis Testing: A Simplified GuideTable of contents. ![hypothesis testing for 2 means Know-It-All-About-Hypothesis-Testing-A-Simplified-Guide](https://jaro-website.s3.ap-south-1.amazonaws.com/2024/08/Know-It-All-About-Hypothesis-Testing-A-Simplified-Guide.jpg) - jaro education
- 13, August 2024
Hypothesis testing is one of the major methods in the grand scheme of statistics. It assists in deriving data-driven decisions, evaluating theories, and inferring meaningful conclusions from data. But what is hypothesis testing, and why is it so important in statistics? For those who want to learn and enhance their skills, the IIM Nagpur PG Certificate Programme in Data Science for Business Excellence and Innovation offers the perfect platform for learning from professionals, gaining hands-on experience, and moving up the value chain. Introduction to Hypothesis TestingHypothesis testing is a means to make decisions about population properties based on the information derived from a sample. It simply provides a basis for the testing of assumptions or hypotheses made about a certain parameter in a population. Statement of the whole process involves a null hypothesis denoted by H0 and an alternative hypothesis denoted by H1, followed by the collection of data and subsequent analysis to see whether it favours the rejection of the null hypothesis in favour of the alternative. In other words, hypothesis testing gives the answers to such questions as: - Does a new drug improve patient outcomes?
- Is a new teaching method more effective than the old one?
- Does a marketing campaign increase sales?
![hypothesis testing for 2 means Studies that need Hypothesis Testing](https://jaro-website.s3.ap-south-1.amazonaws.com/2024/08/1-5-scaled-1.webp) *ProjectGuru The Hypothesis Testing ProcessThe hypothesis testing process is quite logical and it contains several critical steps: - State the Hypotheses: The hypotheses state the null hypothesis, H0, and the alternative hypothesis, H1. The null hypothesis normally represents a no-effect or no-difference statement, while the alternative represents what is to be proved.
- Select the Level of Significance (α): Probability of rejecting the null hypothesis when it is true. Common values are 0.05, 0.01, and 0.10.
- Choose the Right Test: Depending on the data and hypothesis, the test to be applied will be different, it could be anything from a t-test and chi-square test, among others.
- Gather and Summarise the Data: Get the data either through experiments or employing observation and then summarize the same through relevant statistics.
- Calculate the Test Statistic: The test statistic is calculated with the help of data. It expresses the probability that the sample data will be observed under the null hypothesis.
- Make a Decision: Compare the computed value of the test statistic to the critical value obtained from the statistical table or, using the p-value, accept or reject the null hypothesis.
- Draw a Conclusion: Using the results in the setting of the research question.
Hypothesis Testing TypesWithin hypothesis testing, there are varieties that best fit different sorts of data and research questions. The main kinds include: - Z-Test: Used with large samples, n > 30, with known population variance.
- One-sample t-test: The sample mean is different from a known population mean.
- Two-sample t-test: Used for comparison of the means of two independent groups.
- Paired t-test: Comparison of means from the same group at different times.
- Chi-Square Test: This is carried out with categorical data to assess the probability that such a distribution would occur by chance. It includes the chi-square goodness of fit test, which shows whether a sample conforms to the population, and the chi-square test for independence, which determines whether two variables are independent of one another.
- ANOVA: This is used to compare more than three groups’ means to determine if at least one mean of the groups differs from others.
- F-Test: It tests the hypothesis of equality of two population variances.
Examples in Real Life of Hypothesis TestingLet us see how it works in practice with some examples. Example 1: A/B Testing in MarketingA company would like to know whether the new layout of a website, version B, provides more user engagement than the old layout, version A. The null hypothesis is that both versions have no difference in engagement. The alternative hypothesis is that the new layout leads to higher engagement. Performing an A/B test and examining the data will enable the company to either accept the new layout or not. Example 2: Clinical Trials in HealthcareA new medication in healthcare is tested in a clinical trial. Researchers want to establish if it can reduce blood pressure better than a previously existing one. The null hypothesis, H0, assumes no difference in blood pressure reduction between the new and the existing medications. The alternative hypothesis, H1, is that the new medication is more potent. The researchers can make an informed inference after administering different groups with the medications, measuring changes in blood pressure, and comparing such changes using a t-test. Example 3: Quality Control in ManufacturingA manufacturer wants to be certain that the true mean diameter for bolts manufactured by a machine is 5 mm. The null hypothesis is that the mean diameter is 5 mm. The alternative hypothesis is that the mean diameter is not 5 mm. The manufacturer conducts a hypothesis test based on a sample of bolts, measuring their diameters. Significance of Hypothesis Testing in BusinessHypothesis testing is not merely an exercise alma mater; rather, it is something much needed for making a business decision. It may support enhancing or optimizing business strategies, operations, and customer satisfaction by rigorous testing of assumptions based on data-driven decisions. For instance, this would include areas such as product development, market research, or quality assurance. This nuance in business matters a lot to decisions. It is useful in finding chances for innovation and optimizing marketing strategies to assure product quality. Hypothesis testing is used by businesses to test new ideas and concepts before full-scale implementation to avoid loss and risk, hence maximizing the chances of return maximization. For instance, in the retail sector, one can use hypothesis testing to determine if the promotional campaign is effective. Comparing the sales data before and after a promotion will help the business learn if the promotion worked. In manufacturing, hypothesis testing can be used to ensure that production processes are within specified limits, to maintain the quality and consistency of the product. Moreover, hypothesis testing is at the core of any financial analysis and forecasting . It helps the financial analyst measure investment performance, identify anomalies in financial data, and graph the future trends. It provides a firm statistical method to assist an informed decision that turns on empirical evidence rather than gut feelings or assumptions. An in-depth look at types of hypothesis testingLet us consider in greater detail some of the important hypothesis testing types enumerated earlier, and when and how they are used. The Z-test is very useful in large samples, n > 30, with known population variances. It is frequently used in quality control and survey analysis. For example, suppose a company wants to compare the average customer satisfaction score from a large sample with the national average. A Z-test will tell whether their customer service passes or fails the national standard. The T-test is useful when sample sizes are small and the population variance is unknown. There are three variants of the T-test, which makes it versatile in application: - One-sample t-test: This is used to determine if the sample mean is significantly different from any known value. For instance, a school may use a one-sample t-test to determine if the average test score of the class differs from the national average.
- Two-sample t-test: This process compares the means of two independent groups. In a clinical trial, this test will be useful in comparing two different treatments.
- Paired t-test: The same group is measured at two different times. For example, weight loss of people before and after a diet program.
Chi-Square TestChi-square tests are used in categorical data. They are aimed at establishing whether the relationship between the two variables is significant. Chi-square tests may be applied in market research to establish whether some relationships exist, say between customer demographics and buying behavior. For example, it would tell if age groups have varying preferences for a given product or not. ANOVA is used to compare three or more group means. The application of this statistical tool is thus very appropriate, especially in multiple treatment experiments. For instance, to establish which type of crop variety yields the highest under similar conditions, an agricultural scientist will apply the ANOVA to compare the yields of different crop varieties. The F-test is carried out between the two variances to check if they are significantly different. One of the areas this test is commonly applied includes quality control processes, especially when it comes to comparing the variability of product measurements from different machines. Practical Considerations in Hypothesis TestingWhile hypothesis testing is an invaluable tool, there are some practical considerations which have to be borne in mind for effective and reliable results. - Sample Size: The size of the sample in a study greatly influences the reliability of the test result. Inconclusive or misleading results are usually obtained when the sample size is small, and accurate estimates are always obtained using larger samples.
- Significance Level (): Selection of the appropriate level of significance is very important. A lower significance level will reduce the risk of type I errors, but on the other hand, increases type II errors or false negatives.
- Test Power: The power of the test refers to the probability of correct rejection of the null hypothesis where it is false. Higher power reduces the risk of type II errors and is obtained either by increasing the sample size or the effect size.
- Assumptions: There are different assumptions for the various hypothesis testing techniques. Some require normality and equal variances. In this respect, it is also important to check the assumptions before conducting the test to avoid erroneous conclusions.
![hypothesis testing for 2 means Develop data-driven strategies with Hypothesis Testing](https://jaro-website.s3.ap-south-1.amazonaws.com/2024/08/code-review-concept-illustration_114360-3973.webp) Hypothesis testing is one of the critical parts of a statistical analysis and hence sets a clearly defined framework within which data-driven decisions can be made. Once you have grasped how the process and types of hypothesis testing work, you will be able to apply such methods to real-world problems in ways that can drive business excellence and innovation. It isn’t a theoretical concept but a practical tool that enables better decision-making across many domains. Be it healthcare, marketing, or manufacturing, it is understanding hypothesis testing that, with the application of this understanding, leads toward more informed and data-driven decision-making to propel the organization in the proper direction. Fill The Form To Get More Information - I agree to the Terms and Conditions of this website.
Related ProgramChief technology officer programme offered by cep – iit delhi, advanced programme in ev technology – cep, iit delhi, professional certificate programme in digital marketing for performance & growth – iim kozhikode, post graduate certificate programme in manufacturing management & analytics – iim trichy, recent blogs. ![hypothesis testing for 2 means How-To-Select-The-Right](https://jaro-website.s3.ap-south-1.amazonaws.com/2024/08/How-To-Select-The-Right-1024x576.jpg) How To Select The Right Forecasting Technique?![hypothesis testing for 2 means Compare-the-Types-of-Capital-Budgeting-for-Business-Victory](https://jaro-website.s3.ap-south-1.amazonaws.com/2024/08/Compare-the-Types-of-Capital-Budgeting-for-Business-Victory-1024x576.jpg) Compare the Types of Capital Budgeting for Business Victory![hypothesis testing for 2 means Empowering-Youth-in-India](https://jaro-website.s3.ap-south-1.amazonaws.com/2024/08/Empowering-Youth-in-India-1024x576.jpg) Empowering Youth in India: Unlocking Bright Futures with Revolutionary Online Learning![hypothesis testing for 2 means The-Truth-About-Online-MBA-In-Finance-Degree-You-Need-To-Know](https://jaro-website.s3.ap-south-1.amazonaws.com/2024/08/The-Truth-About-Online-MBA-In-Finance-Degree-You-Need-To-Know-1024x576.jpg) The Truth About Online MBA In Finance Degree You Need To Know![hypothesis testing for 2 means Useful-Network-Analysis-Tools-You-Need-to-Know](https://jaro-website.s3.ap-south-1.amazonaws.com/2024/08/Useful-Network-Analysis-Tools-You-Need-to-Know-1024x576.jpg) Useful Network Analysis Tools You Need to Know![hypothesis testing for 2 means Know-It-All-About-Hypothesis-Testing-A-Simplified-Guide](https://jaro-website.s3.ap-south-1.amazonaws.com/2024/08/Know-It-All-About-Hypothesis-Testing-A-Simplified-Guide-1024x576.jpg) Trending Blogs![hypothesis testing for 2 means Descriptive-vs.-Inferential-Statistics-Key-Differences](https://jaro-website.s3.ap-south-1.amazonaws.com/2024/06/Descriptive-vs.-Inferential-Statistics-Key-Differences.jpg) Leave a Comment Cancel replySave my name, email, and website in this browser for the next time I comment. ![hypothesis testing for 2 means Jaro Education](https://jaro-website.s3.ap-south-1.amazonaws.com/2022/03/Jaro-Logo-White.png) Long Duration Certification Programs- Accelerated General Management Programme - IIM Ahmedabad
- Advanced Strategy for Products and Marketing & Advanced Analytics for Products and Marketing- IIM Kozhikode
- Professional Certificate Programme in Investment Banking - IIM Kozhikode
- Executive General Management Programme - IIM Trichy
- PG Certification Program in Business Analytics & Application- IIM Trichy
- PG Certificate in Cyber Security- IIT Palakkad
- Executive Program in Business Management-IMT Ghaziabad
- PG Certificate Programme in Fintech- IIM Nagpur
- Adani Institute of Digital Technology & Management Ahmedabad-Executive Program in Business Analytics
Online Bachelors Degree Programs- Online BCA - Manipal University, Jaipur
- Online BBA- Manipal University, Jaipur
- Online BBA Degree Program-Dr D. Y. Patil Vidyapeeth Pune
- Online B.Com- Manipal University, Jaipur
Doctoral Programs- Doctor Of Business Administration (DBA)-Swiss School of Management Switzerland
Online Masters Degree and PG Programs- Online MBA- Manipal University, Jaipur
- Online MBA Degree Programme-Dr D. Y. Patil Vidyapeeth Pune
- Executive MBA-Dayanand Sagar University Bangalore
- PGDM Hybrid-WeSchool, Mumbai
Trending Programs- Doctorate & Phd Courses
- Online MBA Courses
- Online PG Programs
- Online UG Programs
- Finance Programs
- International Programs
- Analytics & Data Science Programs
- Management & Leadership Programs
Short Duration Certification Programs- Future Leader Program- Deakin University Australia and KPMG in India
- Executive Program in Business Finance - IIM Ahmedabad
- Certification in Corporate Finance & Analytics- KPMG in India
Fulltime Masters and PG Programs- MBA Program in Real Estate - Niranjan Hiranandani School of Real Estate - HSNC University
- About Jaro Education
- Student Grievance Redressal
- Terms of Use
Trending PG & UG ProgramsIn-Demand MBA Courses- MBA in Finance
- MBA in Marketing
- MBA in Human Resource Management
- MBA in Systems & Operations
- MBA Project Management
- MBA in Business Analytics
Copyright © 2022 Jaro Education. All rights reserved. Coming Soon![](//sektorel.online/777/templates/cheerup/res/banner1.gif) |
COMMENTS
Step 1: Determine the hypotheses. The hypotheses for a difference in two population means are similar to those for a difference in two population proportions. The null hypothesis, H 0, is again a statement of "no effect" or "no difference.". H 0: μ 1 - μ 2 = 0, which is the same as H 0: μ 1 = μ 2. The alternative hypothesis, H a ...
The first step is to state the null hypothesis and an alternative hypothesis. Null hypothesis: μ 1 - μ 2 = 0. Alternative hypothesis: μ 1 - μ 2 ≠ 0. Note that these hypotheses constitute a two-tailed test. The null hypothesis will be rejected if the difference between sample means is too big or if it is too small.
Since we are being asked for convincing statistical evidence, a hypothesis test should be conducted. In this case, we are dealing with averages from two samples or groups (the home run distances), so we will conduct a Test of 2 Means. n1 = 70 n 1 = 70 is the sample size for the first group. n2 = 66 n 2 = 66 is the sample size for the second group.
This statistics video explains how to perform hypothesis testing with two sample means using the t-test with the student's t-distribution and the z-test with...
Step 1: Determine the hypotheses. The hypotheses for a difference in two population means are similar to those for a difference in two population proportions. The null hypothesis, H 0, is again a statement of "no effect" or "no difference.". H 0: μ 1 - μ 2 = 0, which is the same as H 0: μ 1 = μ 2. The alternative hypothesis, H a ...
This is a test of two independent groups, two population means. Random variable: ˉXg − ˉXb = difference in the sample mean amount of time girls and boys play sports each day. H0: μg = μb. H0: μg − μb = 0. Ha: μg ≠ μb. Ha: μg − μb ≠ 0.
Lesson 11: Tests of the Equality of Two Means. Overview. In this lesson, we'll continue our investigation of hypothesis testing. In this case, we'll focus our attention on a hypothesis test for the difference in two population means μ 1 − μ 2 for two situations: a hypothesis test based on the t -distribution, known as the pooled two-sample ...
Say you test your sample the way Sal does it, and realize that the probability of you getting that sample was 1%. Normally, you would reject the null hypothesis. But say the null hypothesis was indeed correct. This means you just happened to choose a lot samples from the far left or far right of the population mean.
Step 1: State your null and alternate hypothesis. Step 2: Collect data. Step 3: Perform a statistical test. Step 4: Decide whether to reject or fail to reject your null hypothesis. Step 5: Present your findings. Other interesting articles. Frequently asked questions about hypothesis testing.
An exercise scientist wanted to test the effectiveness of a new program designed to increase the flexibility of senior citizens. They recruited participants and rated their flexibility according to a standard scale before starting the program. The participants all went through the program and had their flexibility rated again after a month.
This is a test of two independent groups, two population means, population standard deviations known. Random Variable: X¯1 −X¯2 = X ¯ 1 − X ¯ 2 = difference in the mean number of months the competing floor waxes last. H0: μ1 ≤ μ2 H 0: μ 1 ≤ μ 2. Ha: μ1 > μ2 H a: μ 1 > μ 2. The words "is more effective" says that wax 1 lasts ...
We then determine the appropriate test statistic (Step 2) for the hypothesis test. The formula for the test statistic is given below. Test Statistic for Testing H0: p = p 0. if min (np 0 , n (1-p 0 )) > 5. The formula above is appropriate for large samples, defined when the smaller of np 0 and n (1-p 0) is at least 5.
10.E: Hypothesis Testing with Two Samples (Exercises) These are homework exercises to accompany the Textmap created for "Introductory Statistics" by OpenStax. You have learned to conduct hypothesis tests on single means and single proportions. You will expand upon that in this chapter. You will compare two means or two proportions to each other.
Given data from two samples, we can do a signficance test to compare the sample means with a test statistic and p-value, and determine if there is enough evidence to suggest a difference between the two population means. ... I saw it done in a Hypothesis Test but now I'm slightly confused. :\
Hypothesis Testing for Two Means and Two Proportions . Class Time: Names: Student Learning Outcomes. The student will select the appropriate distributions to use in each case. The student will conduct hypothesis tests and interpret the results.
Step 1: Determine the hypotheses. The hypotheses for a difference in two population means are similar to those for a difference in two population proportions. The null hypothesis, H 0, is again a statement of "no effect" or "no difference.". H 0: μ 1 - μ 2 = 0, which is the same as H 0: μ 1 = μ 2. The alternative hypothesis, H a ...
Requirements: Two normally distributed but independent populations, σ is unknown. Hypothesis test. Formula: . where and are the means of the two samples, Δ is the hypothesized difference between the population means (0 if testing for equal means), s 1 and s 2 are the standard deviations of the two samples, and n 1 and n 2 are the sizes of the two samples. The number of degrees of freedom for ...
It can also be used to compare the mean of two samples. It is used to compute the z test statistic. ... To get the alpha level in a two tail hypothesis testing divide \(\alpha\) by 2. This is done as there are two rejection regions in the curve. Explore math program. Download FREE Study Materials. Hypothesis Testing Worksheet.
T-tests are used when comparing the means of precisely two groups (e.g., the average heights of men and women). ... Hypothesis testing is a formal procedure for investigating our ideas about the world. It allows you to statistically test your predictions. 2230. Test statistics | Definition, Interpretation, and Examples ...
For a test for two proportions, we are interested in the difference between two groups. If the difference is zero, then they are not different (i.e., they are equal). Therefore, the null hypothesis will always be: H 0: p 1 − p 2 = 0. Another way to look at it is H 0: p 1 = p 2.
Table 8.3: One-sided hypothesis testing for the mean: H0: μ ≤ μ0, H1: μ > μ0. Note that the tests mentioned in Table 8.3 remain valid if we replace the null hypothesis by μ = μ0. The reason for this is that in choosing the threshold c, we assumed the worst case scenario, i.e, μ = μ0 .
Calculate the results of your two sample t-test. Use the calculator below to analyze the results of a difference in sample means hypothesis test. Enter your sample means, sample standard deviations, sample sizes, hypothesized difference in means, test type, and significance level to calculate your results. You will find a description of how to ...
Hypothesis Testing (Chapter 10) 1 Introduction Let X 1;:::;X n˘p (x). Suppose we we want to know if = 0 or not, where 0 is a speci c value of . For example, if we are ipping a coin, we may want to know if the coin is fair; this corresponds to p= 1=2. If we are testing the e ect of two drugs | whose means e ects are 1 and
The mean pregnancy length is 266 days. We test the following hypotheses. H 0: μ = 266. H a: μ < 266. Suppose a random sample of 40 women who smoke during their pregnancy have a mean pregnancy length of 260 days with a standard deviation of 21 days. The P-value is 0.04.
Statistics document from Fanshawe College, 23 pages, Hypothesis Testing Summary • Are there more than 2 outcomes in the data? • Yes => population mean problem. • No => proportions problem. Means Problem • Is the data Normal? • Yes, if the sample size >= 30. • Yes, if you are told the population is Normally
Hypothesis testing is a means to make decisions about population properties based on the information derived from a sample. It simply provides a basis for the testing of assumptions or hypotheses made about a certain parameter in a population. Statement of the whole process involves a null hypothesis denoted by H0 and an alternative hypothesis ...
9.2: Hypothesis Testing with t Expand/collapse global location 9.2: Hypothesis Testing with t Last updated; Save as PDF ... (\Sigma\)=215, we find that the mean is \(\overline{\mathrm{X}}\) = 53.75 (215 divided by sample size 4), which allows us to fill in the rest of the table to get our sum of squares \(SS\) = 564.74, which we then plug in to ...