[ad_1]
Python Data Analysis Project
Assignment Instructions
Write a program that can help you prepare to analyze a set of data collected from a cognitive psychology study using either eye tracking or brain activity (EEG) observations
You have each been provided with your own unique data files to process. Your data file contains a log of a lot of raw data recorded from a sustained attention task, with many lines recorded for every trial of the task. The data are arranged in a data frame with the columns:
Participant The participant number randomly assigned to this participant
Trial The trial number, between -17 and 288
Stimulus The digit that was displayed for this trial
Time The time since the start of the trial when this observation occurred, in milliseconds
Observation An indication of what was observed, EEG frequency power (in one of the alpha/beta/delta/gamma/theta bands), eye location and distance from last location, press (spacebar was pressed), self-reports of either mind_wandering or not_mind_wandering
Left If EEG observation, the power in the left frontal lobe
Right If EEG observation, the power in the right frontal lobe
Distance If eye observation, the Euclidian distance between successive observations X If eye observation, the horizontal pixel coordinate of the eye at this moment
Y If eye observation, the vertical pixel coordinate of the eye at this moment
With your own data file, you need to write a program that can summarize the data collected for each trial, such that your new data file has only 1 row of data for each trial. Your summary data file should have the following comma-separated header:
Participant Trial Stimulus RT Error MW
Plus, one pair from:
Total Eye Distance Blinked
Left_Mean_Alpha Right_Mean_Alpha
Left_Mean_Beta Right_Mean_Beta
Left_Mean_Delta Right_Mean_Delta
Left_Mean_Gamma Right_Mean_Gamma
Left_Mean_Theta Right_Mean_Theta
Your program will need to:
- Ignore data for trial numbers < 1 entirely
- Ignore eye position and EEG data recorded after 1150 ms for any given trial
- Output the participant number, trial number, stimulus, response time, error status, mind wandering status (if known), and either some eye tracking data or EEG data.
- Get response times (RT) for each trial based on the time recorded for a ‘press’ observation
- Calculate and output whether the trial response was an error or correct, based on the presence of a ‘press’ observation, where an error is either pressing when the stimulus is a 3 or not pressing when it isn’t a 3. Errors should be coded as 1 and correct responses as 0.
- Output ‘mind_wandering’ or ‘not_mind_wandering’ observations as a number instead, with mind wandering status coded as 1 (mind_wandering) and 0 (not_mind_wandering), otherwise leave this cell blank
- Calculate: a. The mean alpha/beta/delta/gamma/theta EEG frequency power values for each trial, as you prefer, for the left and right frontal lobes OR b. Total eye distance travelled during the trial and whether a blink occurred, where blinks are defined as an (x, y) coordinate of (0, 0) for more than 40 ms in a row
- If you use a pandas data frame to output your summary data CSV file and it outputs with a data frame row number, your header should also include ‘ROW’ prior to the ‘Participant’ heading. Python Data Analysis Project
Finally, using either jamovi or a separate Python program, you will need to analyze this data file to determine whether either of the Eye/EEG measures you chose to output above show significant differences based on whether an error was made or not, only for trials where the stimulus is a 3. Accordingly, for Part 1 you will need to submit each of the following:
- A Python program that produces your summary data file
- The summary data file you produced
- Either a jamovi file with your analysis showing or another Python program conducting your analysis
Python Data Analysis Project
Need Help with a similar Assignment?
The post Python Data Analysis Project appeared first on homeworkcrew.
[ad_2]
Source link
"96% of our customers have reported a 90% and above score. You might want to place an order with us."
