%% EXAMPLE 1: Load the consolidated sleep diary data
load diaries.mat;
sleepHours = (wakeTimes - bedTimes)*24;
%% EXAMPLE 2: Does subject 1 sleep 8 hours on average?
%% EXERCISE 1: What is the null hypothesis for EXAMPLE 2?
%% EXERCISE 2: Is the null hypothesis rejected for EXAMPLE 2?
%% EXAMPLE 3: Do students in section 2 sleep 8 hours on average?
%% EXERCISE 3: What is the null hypothesis for EXAMPLE 3?
%% EXERCISE 4: What is the alternative hypothesis for EXAMPLE 3?
%% EXERCISE 5: Is the null hypothesis rejected in favor of the alternative hypothesis for EXAMPLE 3?
%% EXAMPLE 4: Do the students in sections 2 and 3 sleep a different amount?
%% EXAMPLE 5: Do section 2 and 3 students sleep differently at the 0.01 significance level?
%% EXAMPLE 6: Do section 2 students sleep more than section 3 students?
%% EXAMPLE 7: Do section 2 students sleep more than section 3 students (fewer assumptions)?