Research Question: Is there a significant difference between the number of calories that are consumed when kids help in making dinner or don’t? If so, which method gets them to eat more food?
H0: There is no significant difference between the amount of food that is consumed if they help or don’t help in making dinner. H1: There is a significant difference between the amounts of food that is consumed if they help or don’t help in making dinner.

library("readxl")
library("car")
## Loading required package: carData
kidsCal <- read.csv("C:/Users/apoor/Downloads/kidscalories (1).csv", header = TRUE)

#Factoring to read data as catagorical

kidsCal$helpedinprep <- factor(kidsCal$helpedinprep)

#Variance check

leveneTest(kidsCal$calorieintake, kidsCal$helpedinprep)

#Since there is no significant difference, we can move ahead with the independent T-Test.

t.test(calorieintake~helpedinprep, data = kidsCal, var.equal = TRUE)
## 
##  Two Sample t-test
## 
## data:  calorieintake by helpedinprep
## t = 2.8137, df = 45, p-value = 0.007236
## alternative hypothesis: true difference in means between group 1 and group 2 is not equal to 0
## 95 percent confidence interval:
##   24.04243 145.15859
## sample estimates:
## mean in group 1 mean in group 2 
##        431.3996        346.7991

#There is a significant difference between the two groups based on their means. We can see that Group 1 is consuming more calories, this indicates that the children who assisted in the dinner’s preparation consumed more calories.

tapply(kidsCal$calorieintake, kidsCal$helpedinprep, sd)
##         1         2 
## 105.70124  99.50114

#Summary: In this study, we examined the difference in calories in kids when they help cook dinner or do not help. We started by getting our data in order so that the helping predictor would be treated as a categorical variable. Then, since there was no statistically significant difference between the groups, we may infer that the groups were independent and had equal variance. Then, using a t-test, we discovered a significant difference. A significant difference between the number of calories consumed by children who assisted in the kitchen (M = 431.39; SD = 105.7) and those who did not (M = 346.79; SD = 99.50). Therefore, as a result, we failed to reject H0. We learned the method that involves kids in making dinner makes them eat more.