Week 4 - Friday, February 13th
Class Slides and Materials
Due Next Week
- In Discussion Section, Practice for Brain Exam + Work on Lab 3
- Complete and Submit Lab 3
- Read Chapter 4 of Why Statistics? on Descriptive Statistics.
- Complete Chapter 4 Quiz on bCourses.
Lab 3
Use R to answer the following questions. Make sure that you show your R code and the output (result or graphs.) You can do this by taking a screenshot and pasting into your Google / Word Document, or (for students wanting an extra challenge) working in a Quarto document.
Problem 1. Interrpution Problems.
Download the “interruption” data from bCourses, and import this data into R. This dataset has two variables of the number of interruptions counted before (int1) and after (int2) our operationalization.
- Load the data (I’ll call it d if you want to follow along with my code), check to make sure it loaded correctly, and report the sample size and names of the variables.
- Graph these variables as a histogram (use the par() function to graph them side by side). Change the arguments so the graphs have the same x-axis and y-axis ranges, and nice labels.
- Report the mean, median, range, and standard deviation for each variables. Add vertical lines to your graphs above that illustrate the mean (in red), the median (in blue), and the standard deviation (in dashed red).
- Describe how these statistics changed after operationalizing an interruption, and why these changes make sense given the nature of our operationalizations. Then, explain why the median is closer to the mean for Time 2.
- Just to make sure we can still do this, graph a categorical variable from the dataset, report the frequency of each group, and describe what you learn from the distribution.
Problem 2 (In Discussion Section). Mini Problems
Load the mini dataset (in the class dataset). Check to make sure the data loaded correctly. Then, choose two variables from the mini dataset. Graph each variable as a histogram, and report the mean, median, standard deviation, and range. Make sure to do any necessary data cleaning (e.g., outlier removal), and make the graphs look nice. Below each graph, describe what the statistics teach you about the people in the dataset.
Problem 3. More Brain Exam Practice.
Here’s a link to a previous semester’s BRAIN EXAM. Answer the questions, and use the key (posted to the partial key) to review your answers. For this problem, just explain how the practice exam went for you. Note that each semester’s exam will be a little different.
Problem 4 (In Discussion Section). Mode Problems
R does not have a built-in function to calculate the mode. Use your favorite search engine to find a method - make sure to cite your source, and describe what you learned from the code that you found. Then check that your method works by defining two variables in R - one with a set of numbers that has one mode, and one with a set of numbers that has two modes. [For example : variable1 <- c(1, 1, 2) has two modes]. Use the mode function on each variable to confirm that the mode function works. Then, use the mode function on the variable you focused on in Problem 3.
AI Disclosure.
Please describe how you used AI tools; make sure you include specific prompts here. Thanks!