Sunday April 7, 2024knitr::opts_chunk$set(error = TRUE)
a3 <- read.csv("/Users/dhruvsapra/Downloads/assign.csv")
# if you use any packages, you can library() them here (but none are needed)
The mean daily screentime for school-age children in non-North American countries post-pandemic is 4.4 hours. This hypothesis posits that the average screentime has not increased from the pre-established average prior to the pandemic.
cat(“H0: μ = 4.4”)
cat(“H1: μ > 4.4”)
Use this space for your answer to Question 2.
The validity of the t-test for our hypothesis relies on meeting the following model conditions:
Each child’s screentime data point is collected independently. This condition is generally met if each observation represents a different individual and the data collection process does not link the observations.
The screentime data should be normally distributed, especially for smaller samples. This can be assessed through QQ-plots or the Shapiro-Wilk test. For large samples (n > 30), the Central Limit Theorem helps mitigate non-normality concerns.
The data should come from a random sample of the population, ensuring it’s representative of all school-age children in non-North American countries.
Adequate sample size: Generally, a sample size of 30 or more is recommended to ensure that the sampling distribution of the mean is approximately normal.
If you need R code/output as part of your answer, you could use the following R chunk or create additional ones
shapiro.test(assign$screen)
## Error in assign$screen: object of type 'closure' is not subsettable
# conduct test
t_test_result <- t.test(assign$screen, mu = 4.4, alternative = "greater")
## Error in assign$screen: object of type 'closure' is not subsettable
# Display the t-test results
print(t_test_result)
## Error in eval(expr, envir, enclos): object 't_test_result' not found