As part o fthe NHANES study, the triglyceride levels of 3026 adult women were measured. Triglycerides, the main constiuent of both vegetable and animal fat, have been linked to atherosclerosis, heart disease, and stroke. Let’s considers this whole group of women the population for the purposes of the simulation. We are going to conduct a study of this population by taking a small sample, say of 25 women, from it. We will compare the distribution of triglycerides in our population and in the sample:
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 19.0 68.0 98.0 116.9 147.0 399.0
The distribution of triglyceride levels for 3026 women is unimodal and skewed right. The center of the distribution is 98 mg/dL. The middle 50% of women have levels of 68 mg/dL and 147 mg/dL. Normal triglyceride levels are below 150 mg/dL, so almost 25% of the population has high levels of triglycerides.
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 35.0 71.0 91.0 107.1 117.0 256.0
The single sample of women drawn from the population is unimodal and slightly skewed to the right.The center is at 89 mg/dL and the range is from 28-287 mg/dL.
## [1] 116.9451
## [1] 107.08
## [1] 67.94322
The mean of the sample (130.16 mg/dL) is higher than that of the population (116.95 mg/dL)
It is worth noting that (a) the distribution of tryglycerides in the population is clearly right-skewed, (b) the sample looks representative of the population as it should because it is representative, and (c) the sample means are close, but the sample mean is clearly off a bit in terms of estimating a population mean.
This is just one sample; the means of others randomm samples might be much further or closer to the population mean. To see that distribution, we’ll have to repeat the sampling process many times and obtain sample means.
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 80.4 106.0 115.6 116.4 126.2 146.9
The distribution of mean triglyceride levels created from 100 samples of 25 randomly-selected women in the NHANES study is approximately Normal with a mean of 119 mg/dL.
The distribution of 100 sample means is unimodal and approximately symmetric without any outliers. Therefore, we can model the distribution with a mean at population mean of 117 mg/dL and a standard error of the population standard deviation of 68, divided by the sq root of sample size (n= 25). This computation is shown in the code below
## [1] 13.6532
## [1] 13.58864
## [1] 116.414
The sampling distribution of the sample means of triglyceride levels is approximately Normal with a mean of about 117 mg/dL and a standard error of 13.6 mg/dL
Defining the z-score formula to suit the sampling distribution of the means from above will give us the following code:
So, though not a perfect Normal Model, the approximation seems pretty good. Given this, we can make some distributional predictions of sample means of triglyceride levels for sample of 25 women. Remember, this is not a prediction of an individual woman’s triglyceride level and its relation to the mean of the population. Instead it is the probability of the mean of a sample of 25 and how it relates to the mean of the sampling distribution. Note: individual data is more likely to be deviant from a population mean than a sample’s meanis to be deviant from the mean of a sampling distribution. We can use this information for inference testing.
Probability that a sample mean is less than 100 mg/dL if true mean is 117
## [1] 0.1061973
The sample mean triglyceride level representing the 90th percentile - top 10%
## [1] 134.3597
A sample mean triglyceride level of 134.3597 mg/dL represents the cut-off for the top 10%.
## [1] 18.3308
## [1] 91.65401
The middle 50% of sample means of triglyceride levels only vary by 18.33 mg/dL, while the population’s middle 50% (by individual) varies by 91.65 mg/dL. This confirms the Central Limit Theorem - sample means will be more Normal and less variable as sample size increases.
## [1] 0.04488361
It would be highly unusual to see a sample mean greater 140 mg/dL. We would only expect to see this mean 4.5% of the time. However, seeing an individual above 140 mg/dL is much more likely. We would see this result 36.7% of the time.
Null Hypothesis: mean = 117. The average triglyceride level is 117 mg/dL
## [1] 0.07108196
Though the difference is considerable. We expect to see a sample mean of 97 mg/dL 7.1% of the time. This is higher than the standard significance level of 5%, so we RETAIN THE NULL. There is not enough evidence that the experimental drug lower triglyceride levels in women.