My research question is: Does taking a short nap (15 minutes) one hour before taking an IQ test affect IQ scores? The population parameter of interest is the difference of means in IQ scores for all adult citizens of the town of Vardo between those who take an IQ test after taking a 15-minute nap compared to those who take an IQ test without napping beforehand (\(\mu_{nap}\)-\(\mu_{nonap}\)). According to the literature, “Naps can reduce sleepiness and improve cognitive performance. The benefits of brief (5-15 min) naps are almost immediate after the nap and last a limited period (1-3h)” (Lovato et al, 2010, p. 1). Also, in a previous study, “Mean VIQ scores were higher in nappers than non-nappers (Figure 2). For frequency, the difference between napping 5–7 times per week and non-napping was statistically significant, with a mean score increase of 4.28 points” (Liu et al, 2019). These research papers inspire my research question because I want to determine if the difference between IQ scores between subjects when they take a nap and do not take a nap is statistically significant. I will take a simple random sample (SRS) to generalize my results to all Islanders of the town of Vardo. Before I saw any data, I suspected that people who took a 15-minute nap before taking the IQ test would score differently than those who took the test without napping beforehand.

The observational units are the 40 people from the town of Vardo who participated in the experiment. 20 people were in the control group and 20 people were in the experimental group. The 40 subjects were randomly selected from the town of Vardo using a random number generator to generate the numbers 1 to 567 (there are 567 households in Vardo). The first person from each household was selected. A second random generator (with a range of 1 to 2) was used to see if that subject would be Group 1 (the experimental group) and Group 2 (the control group). Thus, subjects were randomly assigned to treatment groups. If the first person listed from a household refused to participate in the experiment or if that household was empty, another household was selected via the random number generator (with a range of 1 to 567). I randomly selected households using the random number generator until there were 20 subjects in each of the two treatment groups. The response rate was 59.7% (40 households responded out of the 67 total households that were randomly selected). To obtain the number of subjects initially randomly selected, I had to randomly select 27 more subjects before there were 20 subjects in each treatment group. The control group was given an IQ test, rested for one hour with no, nap, and took another IQ test. The experimental group was given an IQ test, took a 15-minute nap, and then had an hour to sit before taking a second IQ test. The difference in IQ scores was measured for each subject in both the control and experimental groups. Throughout the experiment, one potential source for sampling errors was that I selected the first individual from a randomly selected household instead of doing another random sample to determine the individual from the household. This may have increased bias. Another potential source for sampling errors was that if not all 20 households responded who were randomly selected to each group, I went back to randomly select more households to the group that needed more subjects (without random assignment). At the start, I could have randomly assigned more households to each group to ensure complete random assignment and reduce bias. A potential source for non-sampling errors was the slight variation in time between finishing napping and taking the second IQ test for subjects in the experimental group (this time was roughly one hour). Also, there was a slight variation of time between taking the first and second IQ tests for subjects in the control group (this time was also roughly one hour). This error was hard to prevent because each subject was given the IQ tests and started napping/resting at different times so the timing was tricky to keep track of.

The variables I am choosing to work with are napping and score. Napping is a binary categorical variable (whether the subject took a 15-minute nap before taking an IQ test) and is it the explanatory variable. IQ score is a quantitative variable (the score on the IQ test) and it is the response variable. I chose to investigate these variables because I have read that taking an IQ test after taking a short nap can affect one’s IQ score, and I want to see if this holds for the Islanders. I will first measure the subjects taking the IQ test with no nap and then give them a break before having them take a nap and waking up from the nap to take the IQ test one hour after waking up. This is the experimental group. I think one hour is a good break between waking up from the nap and taking the IQ test because it will allow them to feel fully awake while also gaining the benefits from the nap. According to PubMed, “The [cognitive] benefits of brief (5-15 min) naps are almost immediate after the nap and last a limited period (1-3h)” (Lovato et al, 2010, p. 1). Hence, a 15-minute nap followed by a one-hour break until taking the IQ test should be the correct length of nap and break between the nap and IQ test to see similar results. I will compare these results to a control group. This group will take an IQ test, wait for an hour (with no napping), and then retake the IQ test.

The subjects who took a 15-minute nap between the first and second IQ tests had a smaller decrease in IQ scores than subjects who had no nap between the two IQ tests. Thus, there appears to be an association between whether or not a subject took a nap between the IQ tests and the difference in their scores. There is more variability in the sample of those who took a nap than those who did not take a nap. For subjects who did not take a nap, the sample distribution is slightly skewed to the left while for subjects that did take a nap, the sample distribution is slightly skewed to the right.

library(readr)
Mini_Project_3_Data <- 
  read_csv("~/Mini Project 3 Data - Sheet1.csv")
head(Mini_Project_3_Data, n=4)
data(Mini_Project_3_Data)
favstats(Difference ~ Nap, data = Mini_Project_3_Data)
library(tidyverse)
ggplot(data=Mini_Project_3_Data, mapping=aes(x=Nap, y=Difference))+
  geom_boxplot()+
  stat_summary(fun = "mean", geom = "point", shape = 8,
               size = 2, color = "blue")+ 
  scale_y_continuous(limits = c(-10, 5))

The population is all adult citizens of the town of Vardo. The parameter is the difference of means in IQ scores for all adult citizens of the town of Vardo between those who take an IQ test after taking a 15-minute nap compared to those who take an IQ test without napping beforehand (\(\mu_{nap}\)-\(\mu_{nonap}\)).

The null hypothesis is that there is no association between whether a Vardo citizen takes a 15-minute nap between two IQ tests and the difference in scores of the two IQ tests. The alternative hypothesis is that there is an association between whether a Vardo citizen takes a 15-minute nap between two IQ tests and the difference in scores of the two IQ tests. \(H_0\): \(\mu_{nap}\) = \(\mu_{nonap}\). \(H_A\): \(\mu_{nap}\) \(\neq\) \(\mu_{nonap}\).

A type I error would be that we find that there is an association between whether a Vardo citizen takes a 15-minute nap between two IQ tests and the difference in scores of the two IQ tests when in reality there is no association between whether a Vardo citizen takes a 15-minute nap between two IQ tests and the difference in scores of the two IQ tests. A type II error would be that we find that there is no association between whether a Vardo citizen takes a 15-minute nap between two IQ tests and the difference in scores of the two IQ tests when in reality there is an association between whether a Vardo citizen takes a 15-minute nap between two IQ tests and the difference in scores of the two IQ tests. The measurements are a representative sample from the town of Vardo because I used random sampling using a random number generator to select the subjects.

There are at least 20 observations in each group (in both the napping and no-napping groups) and the two sampling distributions are not strongly skewed. Hence, the validity conditions for a theory-based approach are met. The standardized statistic is 1.99.

SD.Yes<- 3.34
SD.No<- 1.84

n.Yes<- 20
n.No<- 20

x.bar.Yes<- -2.65
x.bar.No<- -4.35

x.bar.diff<-x.bar.Yes-x.bar.No
cat("difference in sample means is",x.bar.diff)
## difference in sample means is 1.7
SE.x.bar.diff<-sqrt(SD.Yes^2/n.Yes + SD.No^2/n.No)
cat("standard error of the difference in sample means is",round(SE.x.bar.diff,2))
## standard error of the difference in sample means is 0.85
t.stat<-x.bar.diff/SE.x.bar.diff
cat("standardized statistic t is",round(t.stat,2))
## standardized statistic t is 1.99

The two-sided p-value is 0.0558. This means that the probability of observing a difference in mean IQ scores of 1.7 or higher or of -1.7 or lower is 0.0558 assuming the null hypothesis, that there is no association between whether a Vardo citizen takes a 15-minute nap between two IQ tests and the difference in scores of the two IQ tests, is true.

two.sided.p.value<-pval(t.test(Difference ~ Nap, data = Mini_Project_3_Data))
cat("the two-sided p-value is",two.sided.p.value)
## the two-sided p-value is 0.05581902

Since the p-value is between 0.05 and 0.10, we have moderate evidence against the null hypothesis that there is no association between whether a Vardo citizen takes a 15-minute nap between two IQ tests and the difference in scores of the two IQ tests. Since the p-value is between 0.05 and 0.10, we have moderate evidence that there is an association between whether a Vardo citizen takes a 15-minute nap between two IQ tests and the difference in scores of the two IQ tests. We can generalize our results to the population (of the town of Vardo) because random sampling was used. We can determine a cause-and-effect relationship between whether someone took a nap between the two IQ tests and their difference in scores because I used random assignment to place subjects into treatment groups. The validity conditions for a theory-based test are satisfied because there are at least 20 observations in each group (in both the napping and no-napping groups) and the two sampling distributions are not strongly skewed.

library(pairwiseCI)
pairwiseCI(Difference ~ Nap, data = Mini_Project_3_Data, method="Param.diff")
##   
## 95 %-confidence intervals 
##  Method:  Difference of means assuming Normal distribution, allowing unequal variances 
##   
##   
##        estimate  lower upper
## Yes-No      1.7 -0.045 3.445
##   
## 

We are 95% confident that the difference of means in IQ scores for all adult citizens of the town of Vardo between those who take an IQ test after taking a 15-minute nap compared to those who take an IQ test without napping beforehand is between -0.045 and 3.445. Zero is included in the 95% confidence level (because the p-value is slightly above 0.05). Since zero is included in the confidence level, we do not have strong evidence that there is an association between whether a Vardo citizen takes a 15-minute nap between two IQ tests and the difference in scores of the two IQ tests. Since the p-value is between 0.05 and 0.10, it provides moderate evidence (not strong evidence) that there is an association between whether a Vardo citizen takes a 15-minute nap between two IQ tests and the difference in scores of the two IQ tests.

I learned that on average, IQ scores decreased from the first to second IQ test that subjects took. However, this change was minimized when subjects took a 15-minute nap between the two tests compared to subjects who did not nap. I learned that random sampling is harder than it seems, especially since the response rate is much lower than 100%. My data did behave as I expected because there was a difference in means among changes in IQ scores between subjects who took a nap between the two IQ tests and those who did not take a nap. Throughout the experiment, one potential source for sampling errors was that I selected the first individual from a randomly selected household instead of doing another random sample to determine the individual from the household. This may have increased bias. Another potential source for sampling errors was that if not all 20 households responded who were randomly selected to each group, I went back to randomly select more households to the group that needed more subjects (without random assignment). At the start, I could have randomly assigned more households to each group to ensure complete random assignment and reduce bias. A potential source for non-sampling errors was the slight variation in time between finishing napping and taking the second IQ test for subjects in the experimental group (this time was roughly one hour). Also, there was a slight variation of time between taking the first and second IQ tests for subjects in the control group (this time was also roughly one hour). This error was hard to prevent because each subject was given the IQ tests and started napping/resting at different times so the timing was tricky to keep track of. In the future, I want to investigate whether taking a longer nap (i.e. 1 hour) has a greater effect on the change in IQ scores than a 15-minute nap. I can generalize results to the entire adult Vardo population because I used random sampling. Next time, I would give the subjects a larger break between the first and second IQ tests to reduce confounding variables such as their mental tiredness levels.

References

Liu J, Feng R, Ji X, Cui N, Raine A, Mednick SC. Midday napping in children: associations between nap frequency and duration across cognitive, positive psychological well-being, behavioral, and metabolic health outcomes. Sleep. 2019 Sep 6;42(9):zsz126. doi: 10.1093/sleep/zsz126. PMID: 31135911; PMCID: PMC6735910.

Lovato N, Lack L. The effects of napping on cognitive functioning. Prog Brain Res. 2010;185:155-66. doi: 10.1016/B978-0-444-53702-7.00009-9. PMID: 21075238.