library(readr)
SleepMemory <-read_csv("~/presentation data - Sheet1.csv")
head(SleepMemory, n=2)
In my study, the research question is if sleeping time has effect on working memory in college aged adults(18-24). This research question is inspired by observing that some college students can pull up all-nighters to study for exams while some cannot. I choose Islanders to conduct this study. The parameter of interest is the difference in working memory in different sleep group. The literature inspired my work is the “Sleep and Working Memory: Short-Term Links in Daily Life and Long-Term Associations”, which suggest that sleep positively influences our working memory both in short-term and long-term. Unlike this article, I focused more on college aged student like myself. Before getting into the data collection and analysis, I suspected that the group with more sleep will have more working memory than the less-sleep group.
The observational units are the 70 college-aged adult I randomly selected from the islands. To choose participants, I first randomly go to an island, then use random number generator to find the corresponding households. If there’s no college aged student or the person refuses my study, I repeat the process in the island until getting a participant. I measured two variables for sleep and working memory, sleeping time and memory test completion time. For sample collection I asked islanders directly for their sleep last night and record the memory test completion time. The main problem countered is the scarcity of college aged adult among the islanders. It’s hard to find many young people, but luckily the response rate is quite high and there’s no repeat visits needed.
The explanatory variable is Sleeping time, a binary categorical variable that separates sleeping time into more than 8 hours of sleep or less equal than 8 hours of sleep(more, less). The response variable is memory test completion time, a quantitative variable measure the time of a memory test in seconds. Shorter time means more working memory. Here is a side-by-side boxplot and the summary of stats.
bwplot(Sleep ~ Memory,
horizontal = TRUE,
main="Side-by-side boxplots",
data = SleepMemory)
data(SleepMemory)
favstats(Memory ~ Sleep, data = SleepMemory)
From the plot, we see the more-sleep group has shorter average memory test time than the less-sleep group. The less-sleep group has a larger boundary that suggest higher sd inside the group. The stats summary provides the same information. The mean difference is about 6.53 seconds in memory test. From both the boxplot and summary statistics, there appears to be an association between the two variables. More sleep will result in shorter memory test time.
The population in this study is islanders aged between 18 and 24. The parameter of interest is the difference in working memory in different sleep group.Based on the variables and population, here are my hypothesis:
Null Hypothesis: Avg memory game time is the same for “more” and “less” sleep groups. \[H_0:\mu_{more}-\mu_{less}=0\] Alternative Hypothesis: Avg memory game time is not the same for “more” and “less” sleep groups. \[H_A:\mu_{more}-\mu_{less}\neq0\]
Type I error in my study would be concluding sleep has influence on working memory when there’s no impact.(False alarm) Type II error would be concluding sleep has no effect on working memory when there is influences.(Miss) My samples should be considered a representative sample from the population. Since I used random sampling, I am confident that my measurements and conclusion can be generalized to all college aged islanders age 18-24.
Now let’s look at representative statistics. In this study we should use t-test. Since we have more than 20 sample for each group and the data is not skewed, a theory-based t-test is appropriate to assess the significance of sample:
stat(t.test(Memory ~ Sleep, data = SleepMemory))
## t
## 1.879265
The t-stat of 1.879 is less than 2, suggesting there’s moderate evidence against the null hypothesis. However, it’s not significant enough to reject the null.
Here is the p-value corresponding to your alternative hypothesis:
two.sided.p.value<-pval(t.test(Memory ~ Sleep, data = SleepMemory))
cat("The two sided p-value is",two.sided.p.value)
## The two sided p-value is 0.06455653
The p-value of 0.065 means that the probability of observing the sample difference assuming null hypothesis is true is 6.5%. Since the p-value is greater than 0.05, we also can’t reject the null because there’s not enough evidence. In the context of our study, we can’t say there’s association between sleep and working memory.
Based on both the t-test and p-value, we can conclude that sleep has no effect on working memory. However, our t-test and p-value are both very close to reject the null, further investigation is needed to avoid Type IT error.
Here is the 95% confidence interval:
confint(t.test(Memory ~ Sleep, data = SleepMemory))
The interval suggest that we are 95% confident that the parameter of sleep’s influence on memory test falls between these two values. The difference in mean falls between -0.405 and 13.457. Since 0 is included in the confidence interval, we cannot reject the null hypothesis. This gives us the same conclusion as p-value and standardized statistics.
From the statistics we got, we see no effect of sleep on working memory in college aged adults in islands. The data did not behave as I expected according to the literature. However, we are really close from rejecting the null hypothesis. There are many factors that could influence the study. First, the less-sleep group has outliers that have lowered the mean memory test time, we should have larger sample size next time to compensate for the outliers. Confounding variables can also affect the study. For example, IQ is a confounding variable that I found in the outliers(A person in the less-sleep group has an IQ of 150 with 30s memory game time). We should also study the confounding variables such as age or gender on working memory in future studies. Since I’m only focusing on young adults that usually can adjust to sleep deprivation easily, the difference in working memory might not be a lot.
Lücke, Anna, et al. Sleep and Working Memory: Short-Term Linksin Daily Life and Long-Term Associations, Innovation in Aging, Volume. 5, no. Supplement_1, 2021, Pages 329–329, (https://doi.org/10.1093/geroni/igab046.1280.)