Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
An explanation of how to estimate the population mean when the standard deviation is unknown, using the t-distribution and confidence intervals. It covers the assumptions for inference about a mean, the one-sample t statistic and confidence interval, and examples of calculating a confidence interval by hand and using spss. It also discusses the use of the t-distribution in hypothesis testing and the concept of robustness.
Typology: Study notes
1 / 19
Lecture 8, Sections 7.1 & 7. Inference for the Mean of a Population Previously we made the assumption that we know the population standard deviation, σ. We then developed a confidence interval and used tests for significance to gather evidence for/against an hypothesis, all with a known σ. In normal practice, σ is unknown. In this section, we must estimate σ from the data though we are primarily interested in the population mean, μ. Confidence Interval for a Mean First, Assumptions for Inference about a mean: Our data are a simple random sample (SRS) of size n from the population. Observations from the population have a normal distribution with mean μ and standard deviation σ. If population distribution is not normal, it is enough that the distribution is unimodal and symmetric and that the sample size be large (n>15). Both μ and σ are unknown parameters. Because we do not know σ we make two changes in our procedure.
. Standard Error: When the standard deviation of a statistic is estimated from the data, the result is called the standard error of the statistic. The standard error of the sample mean x is x
Where s is the sample standard deviation, n is the sample size.
The t-distributions: The t-distribution is used when we do not know σ. The t-distributions have density curves similar in shape to the standard normal curve, but with more spread. The t-distributions have more probability in the tails and less in the center than does the standard normal. This is because substituting the estimate s for the fixed parameter σ introduces more variation into the statistic. As the sample size increases, the t-density curve approaches the N(0,1) curve. (Note: This is because s estimates σ more accurately as the sample size increases). The t Distributions
the one-sample t statistic
has the t distribution with n-1 degrees of freedom. The One-Sample t Confidence Interval Suppose that an SRS of size n is drawn from a population having unknown mean μ. A level C confidence interval for μ is
s x t n where t* is the value for the t ( n -1) density curve with area C between – t* and t*. This interval is exact when the population distribution is normal and is approximately correct for large n in other cases. Lecture 8, Section 7.1 & 7.
Examples:
By hand: x = 22.5^ s^ = 7.191^ n^ = 8 Lecture 8, Section 7.1 & 7.
Using SPSS: analyze > descriptive statistics > explore Move “vitaminC” to “dependent list”. Click “statistics” and select “descriptives” and change/keep a 95% confidence interval. Click “continue” followed by “OK”. Descriptives Statistic Std. Error Vitamin C Mean (^) 22.50 2. 95% Confidence Interval for Mean Lower Bound (^) 16. Upper Bound
5% Trimmed Mean (^) 22. Median (^) 22. Variance (^) 51. Std. Deviation (^) 7. Minimum (^11) Maximum (^31) Range (^20) Interquartile Range (^14) Skewness (^) -.443. Kurtosis (^) -.631 1. The One-Sample t test:
1. State the Null and Alternative hypothesis.
Examples:
Using SPSS: analyze > compare means > One sample T test Move “vitaminc” into the “test variable box” and type in 40 for the test value. To change the confidence interval, Click “options” and change confidence interval from 95% to whatever. I did not do this as I will keep the 95% default. Click “continue”. Lastly click “OK”. One-Sample Statistics N Mean Std. Deviation Std. Error Mean Vitamin C (^8) 22.50 7.191 2. One-Sample Test Test Value = 40 t df Sig. (2-tailed) Mean Difference 95% Confidence Interval of the Difference Lower Upper vitamin C (^) -6.883 7 .000 -17.500 -23.51 -11. Matched Pairs Design: Lecture 8, Section 7.1 & 7.
A common design to compare two treatments is the matched pairs design. One type of matched pair design has 2 subjects who are similar in important aspects matched in pairs and each treatment is given to one of the subjects in each pair. With only one subject, 2 treatments are given in random order. Another type of matched pairs is before-and after observations on the same subject. Paired t Procedures: To compare the mean responses to the two treatments in a matched pairs design, apply the one-sample t procedures to the observed differences, d. Example: (Problem 7.31 is done by hand and using SPSS): The researchers studying vitamin C in CSB in example 7.1 were also interested in a similar commodity called wheat soy blend (WSB). Both these commodities are mixed with other ingredients and cooked. Loss of vitamin C as a result of this process was another concern of the researchers. One preparation used in Haiti called gruel can be made from WSB, salt, sugar, milk, banana, and other optional items to improve the taste. Samples of gruel prepared in Haitian households were collected. The vitamin C content (in milligrams per 100 grams of blend, dry basis) was measured before and after cooking. Here are the results: Sample 1 2 3 4 5 Before 73 79 86 88 78 After 20 27 29 36 17 Set up appropriate hypotheses and carry out a significance test for these data. (It is not possible for cooking to increase the amount of vitamin C). Lecture 8, Section 7.1 & 7.
By hand: Using SPSS: > Analyze > Compare Means > Paired – Sample T test. Move “before and after” to “paired variable box” (whichever variable is listed first will come first in the subtraction) Click “OK” Paired Samples Statistics Mean N Std. Deviation Std. Error Mean Pair 1 Before 80.80 5 6.140 2. After (^) 25.80 5 7.530 3. Paired Samples Test Paired Differences Mean t df Sig. (2-tailed) Std. Deviation Std. Error Mean 95% Confidence Interval of the Difference Lower Upper Pair 1 before - after 55.000^ 3.937^ 1.761^ 50.112^ 59.888^ 31.238^4. Lecture 8, Section 7.1 & 7.
A confidence interval or statistical test is called robust if the confidence level or P - value does not change very much when the assumptions of the procedure are violated. The t procedures are robust against non-normality of the population when there are no outliers, especially when the distribution is roughly symmetric and unimodal. Robustness and use of the One-Sample t and Matched Pair t procedures: Unless a small sample is used, the assumption that the data comes from a SRS is more important than the assumption that the population distribution is normal. n<15: Use t procedures only if the data are close to normal with no outliers. n>15: The t procedure can be used except in the presence of outliers or strong skewness. n is large (n≥40): The t procedure can be used even for clearly skewed distributions. Lecture 9, Section 7.1 & 7.
Comparing Two Means: Two-Sample Problems: A situation in which two populations or two treatments based on separate samples are compared. A two-sample problem can arise: from a randomized comparative experiment which randomly divides the units into two large groups and imposes a different treatment on each group. From a comparison of random samples selected separately from different populations. Note: Do not confuse two-sample designs with matched pair designs! Assumptions for Comparing Two Means: Two independent simple random samples, from two distinct populations are compared. The same variable is measured on both samples. The sample observations are independent, neither sample has an influence on the other. Both populations are approximately normally distributed.
are unknown. Typically we want to compare two population means by giving a confidence interval
The Two-Sample t Confidence Interval:
2 2 1 2 1 2 1 2
has confidence level at least C no matter what the population standard deviations may be. Here, t* is the value for the t ( k ) density curve with area C between – t* and t *. The value of the degrees of freedom k is approximated by software or we use the
Two-Sample t Procedure: Lecture 9, Section 7.1 & 7.
Robustness and use of the Two-Sample t Procedures : Lecture 9, Section 7.1 & 7.
The two-sample t procedures are more robust than the one-sample t methods, particularly when the distributions are not symmetric. They are robust in the following circumstances: If two samples are equal and the two populations that the sample come from have similar distributions then the t distribution is accurate for a variety of
When the two population distributions are different, larger samples are needed.
the data are clearly non normal or if outliers are present, do not use t.
or strong skewness.
distributions. Examples: Lecture 9, Section 7.1 & 7.
b. Most studies found that the mean SSHA score for men is lower than the mean score in a comparable group of women. Test this supposition here. That is, state the hypotheses, carry out the test and obtain a P -value, and give your conclusions. Using SPSS: Note: The data needs to be typed in using two columns. In the first column you need to put all the scores. In the second column define the grouping variable as gender and enter “ women” next to the women’s scores and “men” next to the men’s scores. Analyze > Compare means > Independent Sample T test Move “score” to “Test Variable” box and “gender” to “grouping variable” box. Click “define groups” and enter “women” for group 1 and “men” for group 2. Click “continue” followed by “OK”. Group Statistics group N Mean Std. Deviation Std. Error Mean score women (^18) 140.56 26.262 6. men 20 121.25 32.852 7. Levene's Test for Equality of Variances t-test for Equality of Means F Sig. t df Sig. (2- tailed) Mean Differenc e Std. Error Differenc e 95% Confidence Interval of the Difference Lower Upper score Equal variances assumed 1.030 .317 1.986 36 .055 19.306 9.721 -.410 39. Equal variances not assumed 2.010 35.537 .052 19.306 9.606 -.185 38. Independent Samples Test We use the second line, “Equal variances not assumed” to get the t test statistic, p- value, etc. Lecture 9, Section 7.1 & 7.
c. Give a 95% confidence interval for the mean difference between the SSHA scores of male and female first-year students at this college.
a. Why was a matched pairs test used as opposed to a two sample t- test? b. Is there a difference between test 1 and test 2 scores. Write out the hypotheses and give the P -value. Are our results significant at the 5% significance level? c. Suppose one of our friends thought test 2 was easier and the students generally did better on it. We want to test whether the student is correct. Write out the hypotheses to test this and give the P- value. Are our results significant at the 5% significance level?
Group Statistics 10 82.80 14.382 4. 10 80.70 14.507 4. test 1 2 score N Mean Std. Deviation Std. Error Mean Independent Samples Test .015 .905 .325 18 .749 2.100 6.460 -11.472 15. .325 17.999 .749 2.100 6.460 -11.472 15. Equal variances assumed Equal variances not assumed score F Sig. Levene's Test for Equality of Variances t df Sig. (2-tailed) Mean Difference Std. Error Difference Lower Upper 95% Confidence Interval of the Difference t-test for Equality of Means a. What procedure was used and why? b. Write out the hypotheses to test this and give the P- value. Are your results significant at the 5% significance level? Lecture 9, Section 7.1 & 7.