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 both variables. Then, calculate the standard deviation “by hand” for int1 (you should get a similar, but not exact, number, as what R gives you.)
Describe how these statistics changed after operationalizing an interruption, and why these changes make sense given the nature of our operationalizations. Then, decide whether our operationalization would be good enough if we were researchers trying to scientifically study interruptions.
Graph a categorical variable from the dataset and report the frequency of each group.
Problem 2. Mini Problems
Load the mini dataset (that you used in Lab 2), check to make sure the data loaded correctly and use this dataset to answer the questions below.
Focus on the variable insta.followers - this measures the number of followers a person says they have on instagram (a social networking website owned by Mark Zuckerberg). Graph this 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), make the graph look nice, and draw vertical lines to illustrate the mean, median, and standard deviation (above and below the mean). Below the graph, describe what each statistic teaches you about the people in the dataset.
Choose another numeric variable from the dataset (see the codebook for a guide). Graph this 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), make the graph look nice, and describe what each descriptive statistic teaches you about the people in the dataset (you do not need to draw them again on the graph, unless you want to / find this helpful!)
Problem 3 (In Discussion Section). More Description Problems.
Repeat the steps for Problem 2, with another dataset (and variable) from the mini class datasets.
Problem 4 (In Discussion Section / On Your Own / In Lecture). Get started on your literature review for the final project.
This doesn’t have to be perfect; just good to get started!