#Data

var.name
Country
AlcoholicBeverages
AnimalProducts
Animalfats
CerealsExcludingBeer
Eggs
FishSeafood
FruitsExcludingWine
Meat
MilkExcludingButter
Offals
Oilcrops
Pulses
Spices
StarchyRoots
Stimulants
Treenuts
VegetalProducts
VegetableOils
Vegetables
Miscellaneous
Obesity
Confirmed
Deaths
Recovered
Active
Population
## [1] 1.736618
## [1] 1.002899

Introduction

For the first assignment, we are analyzing a data set includes the percentage of protein intake from different types of food in countries around the world. The variable of interest that I will calculate confidence intervals on is the Vegetables variable. The Vegetables variable quantifies the percentage of protein consumers around the world receive from vegetables. The mean of the Vegetables variable is 1.736618 and the standard deviation of this variable is 1.002899.

#Confidence Interval of the Mean of Vegetables

## 
##  One Sample t-test
## 
## data:  protein$Vegetables
## t = 22.577, df = 169, p-value < 2.2e-16
## alternative hypothesis: true mean is not equal to 0
## 95 percent confidence interval:
##  1.584772 1.888463
## sample estimates:
## mean of x 
##  1.736618

#Bootstrap Confidence Interval for the Variable Vegetables

##     2.5%    97.5% 
## 1.594916 1.890576
#Bootstrap Sampling Distribution
Bootstrap sampling distribution of sample means

Bootstrap sampling distribution of sample means

#Confidence Interval Interpretation We are 95% confident that the percentage of protein intake from vegetables is between 1.584772 and 1.888463 when using a 95% confidence interval from a t-test. We are 95% confident that the percentage of protein intake from vegetables is between 1.587483 and 1.889746 when using a 95% confidence interval with the bootstrap means. These two confidence intervals are very close to one another. This suggests that this data is most likely parametric, as a difference in these two intervals would suggest nonparametric data that would then be best analyzed with a bootstrap confidence interval that requires less assumptions than the confidence interval from the t-test.