Question 1

Dataset: Diets

According to a report, overweight people on low carbohydrate diets lost more weight and got greater cardiovascular benefits than people on a conventional low-fat diet (healthline.com, March 24, 2020). A nutritionist wishes to verify these results and documents the weight loss (in pounds) of 30 dieters on the low carbohydrate diet and 30 dieters on the low-fat diet.

Test the claim that the mean weight loss for those on the low carbohydrate diet is greater than the mean weight loss for those on a conventional low-fat diet. Assume that the population variances are equal. At the 5% significance level.

head(Diets)
##   Low_carb Low_fat
## 1      9.5     6.5
## 2      8.1     5.8
## 3     10.4     9.9
## 4     11.9     5.1
## 5     11.8     8.0
## 6     12.6     6.3

Question 2

Consider the following competing hypotheses and accompanying sample data drawn independently from normally distributed populations.

\(H_0:\mu_1 - \mu_2 = 0\)

\(H_1:\mu_1 - \mu_2 \ne 0\)

Sample statistics:

x_bar_1 = 57
sigma_1 = 11.5
n_1 = 20
x_bar_2 = 63
sigma_2 = 11.2
n_2 = 20
d_0 = 0
alpha = .05

####condtion met since they are “both drawn independently from normally distributed populations” Test whether the population means differ at the 5% significance level.

#Standard Error
SE = sqrt(sigma_1^2/n_1 +sigma_2^2/n_2)
SE
## [1] 3.589499
#Z statistics
Zstat = (x_bar_1 - x_bar_2 - d_0)/SE
Zstat
## [1] -1.671543

This is two tailed test

pvalue = 2 * pnorm(Zstat,lower.tail=TRUE)
pvalue
## [1] 0.09461454

Conclusion Since p_value (0.09461454) > \(\alpha\) (0.05), reject the null hypothesis. At the 5% significance level, we can conclude that the population means differ at the 5% significance level.