Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CS 1173 Lab 5 - Analysis of Course Cohort Sleep Diary Data Objectives: Use vector indexing to select rows and columns from arrays. Sleep diary

image text in transcribedimage text in transcribed
image text in transcribedimage text in transcribed
CS 1173 Lab 5 - Analysis of Course Cohort Sleep Diary Data Objectives: Use vector indexing to select rows and columns from arrays. Sleep diary Practice using statistical tools and plots. 2 2 Become familiar with sleep diary data for the project. Handle more realistic data. Interpret data and draw conclusions. Hand-in Requirements: " The lab5 directory with all the files included. The lab5Script .m script containing your work for all parts. A Word Document with your analysis. The published script in the same directory. All projects and laboratories should be submitted electronically through Blackboard Learn. Zip up your entire lab5 directory to submit. Overview This laboratory examines the sleep patterns of a cohort of students. The data consists of the sleep diaries recorded by CS 1173 during the current semester. Description of the data File Description The diary file contains the following variables: bedTimes - bed times in decimal-date format (vector) dayCaffeine - daytime caffeine indicators (vector) diaries (insert semester) . mat nightCaffeine - evening caffeine indicators (vector) toSleepMinutes - number of minutes to fall asleep (vector) useAlarm - alarm use indicators (vector) wakeTimes - wakeup times in decimal-date format (vector) File Description gender - 'male' or 'female section - your section number (vector) minutesNap - number of minutes of napping (vector) minsAwake - minutes awake during each night (vector) SSI - Standford Sleepiness ScaleBackground NOTE: The arrays have a column for each person. The vectors have an element for each person. The values in column "n" correspond to the same person as the value in position "n" of each vector. To find YOUR data, look in Blackboard in grades, under the 'Subject Number' heading - that is your column. The number of course sections for CS 1173 varies each semester. There are always at least two sections. Section 0 is the instructors/TAs/Tutors. Your section corresponds to your section in ASAP (CS-1173-001, etc.). The bedtimes and wake-up times use MATLAB's decimal date format. The date is a number representing the offset from 0:00 of a particular reference day. The integer part of this value represents the day and the fractional part represents the fraction of 24 hours represented by the hour and minutes. Part I: Initial set up Use the standard setup by creating a lab5 folder in your Data Drive. Also create a lab5Script.m file. Save this file in your lab5 folder. Download the diaries (insert semester) . mat from Blackboard Learn into your lab5 folder. Include the following lines of script in your code to create new waketime, bedtime arrays, hours of sleep and Total Daily Sleep variables. These lines of code will create new variables you can use in the lab. See the Lab 5 power point presentation for explanations. waketime = (diary.wake Times - floor(diary.wake Times))*24; bedtime = (diary.bedTimes - floor(diary.wakeTimes))*24; hourSlept = waketime - bedtime; totalDailySleep = hourSlept + (minutesNap/60 - (minsAwake/60 - (toSleepMinutes/60); Part II: Calculate overall average values by section and output in tabular form Calculate and output the overall averages of the following information by section in tabular form: wake-up time in hours, bed time in hours, hours in bed (hourSlept from setup), minutes to sleep, minutes of napping, minutes awake, total daily sleep (from setup and Stanford Sleepiness Scale (SSI). Your output should be in tabular format (use it and %#.#f to line up the columns). The first column is YOUR data, and the rest of the columns are by section. The first line of the table corresponds to the headers (e.g., Me Sect0 Sect1 ...). The first column has the names of the indicators (e.g., Wake-up times, etc.). As a hint for this and other parts asking for results for multiple sections. Get the code working for one of the sections. Then you can duplicate and modify the code for the other sections. Part III: Error bar plots of average daily hours of sleep by gender Create a figure that has two error bar lines -- one corresponding to the individual average hours of sleep for men in the cohort and the other corresponding to the individual average hours of sleep for women in the cohort, both by day (across the entire 21 days). Your graph should look similar to Example 8 of Lesson 6, but the data is male vs female and crosses the 21 days period. Write a short paragraph discussing the results in a Word Document. Part IV: Are there differences in sleep patterns between sections? Compare the sleep patterns (i.e., bed times, wake times, hours of sleep, etc.) among groups. You could also test weekday versus weekend. By grouping data appropriately and applying the test2 you will test for differences between your groups. You need to include at least three t-tests. Output h, the p-values, and the confidence intervals. Based on the output of your MATLAB script, write a short paragraph on your Word document discussing the results and offering conclusions. Part V: Publish the results Publish your script by pushing the Publish icon. Make sure that your script is separated appropriately into cells and that each cell has a title indicating what is computed in that cell. Ensure your Word Document is inside your Lab5 directory when you zip up the file. The Word Document must be included for you to get points

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Geometry, Structure And Randomness In Combinatorics

Authors: Ji?í Matousek, Jaroslav Nešet?il, Marco Pellegrini

1st Edition

887642525X, 9788876425257

More Books

Students also viewed these Mathematics questions

Question

Explain this statement: Goals are dreams with deadlines.

Answered: 1 week ago

Question

Personal role: This consists of service to family and friends.

Answered: 1 week ago

Question

The role of life: It consists of your own service to yourself.

Answered: 1 week ago