![stata 13 exercises pdf stata 13 exercises pdf](https://files.liveworksheets.com/def_files/2020/3/30/3301722592468/3301722592468001.jpg)
The mean of educ in the sample, which is also the best estimate of the population mean, is 13.38. Suppose you want to test the hypothesis that the population mean of educ is 14 years. Hypothesis: The Population Mean is Equal to Some Specified Value If you plan on applying what you learn directly to your homework, create a similar do file but have it load the data set used for your assignment.
![stata 13 exercises pdf stata 13 exercises pdf](https://data.princeton.edu/stata/stata16.png)
Then create a do file called ttests.do in that folder that loads the GSS sample as described in Doing Your Work Using Do Files.
![stata 13 exercises pdf stata 13 exercises pdf](https://i.pinimg.com/236x/dd/92/66/dd9266e6e3248da6eba3a5394ae79a9c.jpg)
If you plan to carry out the examples in this article, make sure you've downloaded the GSS sample to your U:\SFS folder as described in Managing Stata Files. We will discuss the interpretation of the t-test in detail for the first type of hypothesis (that the mean is equal to a specified value) but the discussion applies to all the hypotheses a t-test can test. Looking at the results and then picking the alternative hypothesis that matches what you'd like to see will increase the probability of drawing the wrong conclusion from the test. Stata will report results for all three alternative hypotheses, but you should choose which one you're interested in ahead of time. Your alternative hypothesis could then be one of the following: that the mean education level of women is higher than the mean education level of men, that the mean education level of men is higher than the mean education level of women, or that the mean levels of education are different regardless of which is higher. For example, if you're investigating differences between men and women in the mean education level, your null hypothesis will usually be that they are the same. Usually the null hypothesis is the opposite of what you're really interested in. This is called a two-sample t-test, and is the most common.įor all these tests we've described the null hypothesis. The final type of hypothesis we'll consider is whether two groups have the same population mean for a single variable.
![stata 13 exercises pdf stata 13 exercises pdf](https://i1.rgstatic.net/publication/352092223_Stata_basics_Stata_15_or_16/links/60b8aa4392851cb13d708964/largepreview.png)
The Population Means for Two Subsamples are the Same the value of X for observation 1 has a relationship to the value of Y for observation 1 that does not exist between the value of X for observation 1 and the value of Y for observation 2). This is called a paired-sample t-test, because the test assumes that the values of the two variables for the same observation go together (i.e. The Population Means for Two Variables are the SameĪnother type of hypothesis looks at whether two variables have the same population mean. This is called a single-sample t-test, because you look at the entire sample at once. One type of hypothesis simply asks whether the population mean of a variable is equal to some particular value of interest. In this section we'll discuss the following types of tests: The Population Mean is Equal to Some Specified Value The command to run one is simply ttest, but the syntax will depend on the hypothesis you want to test. T-tests are frequently used to test hypotheses about the population mean of a variable. If you are new to Stata we strongly recommend reading all the articles in the Stata Basics section. This article is part of the Stata for Students series.