The variables we need to answer this question have already been used in this module so there is probably no need to look them up. We will use the variables educ and sexage. To answer this question we need to proceed in steps. The first step is to figure out the median level of years of schooling. To do this you could type:
number of years in school
-------------------------------------------------------------
Percentiles Smallest
1% 1 1
5% 3 1
10% 4 1 Obs 3448
25% 6 1 Sum of Wgt. 3448
50% 8 Mean 8.078016
Largest Std. Dev. 3.366933
75% 10 22
90% 12 22 Variance 11.33624
95% 14 23 Skewness .5019617
99% 17 25 Kurtosis 3.849107
From the output above we learn that the median years of
schooling is 8 years. The second step is to investigate the mean of
sexage
for respondents reporting years of school greater than or equal to the median,
to do this you could use the following syntax:
Variable | Type Obs Mean [95% Conf. Interval]
-------------+----------------------------------------------------------
sexage | Arithmetic 1242 18.35105 18.1968 18.50529
| Geometric 1242 18.1583 18.01294 18.30483
| Harmonic 1242 17.96953 17.82202 18.1195
------------------------------------------------------------------------
Variable | Type Obs Mean [95% Conf. Interval]
-------------+----------------------------------------------------------
sexage | Arithmetic 765 18.64706 18.41784 18.87628
| Geometric 765 18.38682 18.17118 18.60502
| Harmonic 765 18.13772 17.92667 18.35379
------------------------------------------------------------------------
We see that the average age at first sexual intercourse among the first group is 18.35, while that of the second group is 18.64. Given these findings, it seems there is virtually no difference in the average age at first sexual intercourse between these two groups.