Agriculture Reference
In-Depth Information
tabstat Salary, by( Source ) stat( mean sd n )
which will display the following output:
Summary for variables: Salary
by categories of: Source
(1-processing plant, 2-feed mill)
Source | mean sd N
---------+------------------------------
1 | 20.24749 8.48991 46
2 | 17.21943 7.024119 35
---------+------------------------------
Total | 18.93907 7.986932 81
----------------------------------------
At this point, we can use these output values to see if there is a real
difference between feed mill employees and the entire poultry indus-
try. The normal distribution will calculate a probability based on the
Z value. To see this, enter in the Command window
display normal ((17.22-18.94)/(7.99/ sqrt (81)))
This results in a value of 0.026, which is below 0.05 (a commonly
used critical probability value). This indicates that the feed mill
employees on average are being paid less than employees overall. If the
values 17.22 and 18.94 were reversed, the value would be 0.974, which
gives the same value if subtracted from 1 (1 - 0.974 = 0.026). You
might think that this is a long way to go to say there are differences
in the salaries, which appears obvious. However, if you double the
standard deviation from 7.99 to 16, the probability is 0.167, which is
above 0.05, suggesting that there is no difference between the salaries.
Another use of Z values is determining an appropriate sample size
in simple comparisons. If you look at the formula for the Z-test above,
it is obvious it can be rearranged and solved for n (sample size). Stata
does offer a command to calculate this.
sampsi #1 #2 [, options ]
This command is capable of computing both sample size or power
of the test. It is also capable of computing these values for one or two
sample hypotheses as well as for both means and proportions. The #1
and #2 values are the proposed means. In addition, several options
Search WWH ::




Custom Search