Day 43 – Calculating Correlation Coefficient using Excel
Problem General Scenario: Dr. Truong wants to examine the relation between the amount of television that people watch and how happy they are. Ten adults participate in her study. Each participant records the total number of hours of TV that he or she watches for a particular week. In addition, at the end of the week, each participant completes a questionnaire that measures the person’s overall happiness. The questionnaire scores can range from 0 (extremely unhappy) to 10 (extremely happy). The results from Dr. Truong’s experiment are listed below.
Table Participant Number Hours of TV Watched Happiness Score
3 Examples Copy the information into your Excel Spreadsheet
Computing the Mean
Computing Mean, or (average in Excel) Click this On the Formulas tab, click “More Functions” Select these cells by dragging it This should appear Select “Statistical”, then choose “AVERAGE” Press “Enter” key twice This would be your “mean” Select the cell where you want to put your mean
Computing the Median
Computing Median Type in “=median(“ Select the numbers by dragging it Press “Enter” key This is your Median Select the cell where you want to put your median
Computing the Mode
Computing Mode Type “=mode(“ Select the numbers by dragging it Press “Enter” This is your mode Select the cell where you want to put your mode
Computing the Correlation Coefficient
Getting the correlation coefficient Compute the Pearson correlation coefficient between hours of TV watched and happiness (round to two decimal places). Type in “=CORREL(“ Select your array1 Put a comma “,” Select your array2 Press “Enter” There it is, a strong negative correlation coefficient. Don’t forget to round two decimal places. Select the cell
Let’s Create a Scatter Plot
Creating a scatter plot on the data given Select the cells On Insert Tab, click Scatter Select “Scatter with only Markers”
On Layout Tab, click “Axis Titles” Click the primary horizontal axis title, select “Title Below Axis.” Type “Hours of TV Watched” Click the primary vertical axis title, select “Vertical Title.” Type “Happiness Score”
Drawing the Line of Best Fit
Draw the line of best fit Make sure you click on the graph Under the Layout Tab Click Tredline, then chose, “Linear Tredine”
The Line of best Fit