Recently Published
Assignment 04
Overview
The purpose of this assignment is to learn how to conduct and report Pearson and Spearman correlations in RStudio.
You will answer the two research questions below using the datasets provided below and the code provided in Module 4.
Datasets
DatasetA.xlsxDownload DatasetA.xlsx
DatasetB.xlsxDownload DatasetB.xlsx
Research Questions
What is the relationship between how much students study (hours) and their exam score (percentage)?
What is the relationship between how much a person uses their phone (hours) and how much they sleep (hours)?
Lecture 4, Part 1: Correlations in Module 4
Set Up R and Import the Data
Install and load all required packages (e.g., readxl, ggpubr)
Download the datasets onto your computer.
Import the datasets into RStudio.
Name each dataset clearly (e.g., DatasetA, DatasetB)
Descriptive Statistics
For each dataset:
Calculate the mean and standard deviation for both variables.
Clearly identify the independent variable and dependent variable.
Part 3: Check Normality
For each dataset:
Create histograms to visually inspect skewness and kurtosis of each variable.
Conduct Shapiro–Wilk tests for to check the normality of each variable.
Decide whether to use:
Pearson correlation (both variables are normal), or
Spearman correlation (one or both variables are not normal).
Part 4: Correlation Analysis
For each research question:
Run the appropriate correlation test.
Determine whether the results are statistically significant.
Interpret the direction (positive or negative).
Interpret the strength (weak, moderate, or strong).
Part 5: Scatterplots
For each dataset:
Create a scatterplot showing the relationship between the two variables.
Include a line of best fit.
Add clear x-axis and y-axis labels.
Use the plot to assess direction, strength, linearity, and outliers.
Part 6: Report the Results
For each research question, report the results, including:
Means and standard deviations
Correlation coefficient (r or ρ)
Degrees of freedom
p-value
Strength and direction of the relationship
Lecture 4, Part 3: RMarkdown and Rpubs
Convert your R Script file (code file) into an R Markdown file (presentation file)
Convert your R Markdown file into an Rpubs URL (which is a sharable html file, accessible to anyone)
Week3_IPL_Datadive
This week data dive analyzes groupby and probability along with trends of total sixes in recent seasons and across venues. It explores IPL team participation across seasons, identifies missing team–season combinations, with a heatmap.
Week 3 Practice -- Answer Key
SOC3320