Question: Note: Please include both R codes and results in your report. (You may use the Compile Report function under Menu File in RStudio to generate

Note: Please include both R codes and results in your report. (You may use the "Compile Report" function under Menu "File" in RStudio to generate a Word/PDF report)

Question : Correlation (30 points)

Load the data NILT2012GR_SUBSET.csv and answer the following questions. The data set contains 9 variables for 1204 citizens, which comes from Queen's University in Belfast (North Ireland) and is based on the Northern Ireland Life and Times Survey (NILT) 2012.

https://1drv.ms/x/s!Aocj0hn12M9m6ncz6dNGwPutNJvX?e=bvp0OC

(a) Create a new variable named log_Income which takes log transformation of the variable persinc2 and calculate its mean and standard deviation. Note that the variable persinc2 measures personal income before tax and national insurance contributions. Then calculate the correlation coefficient between log_Income and rage. (Hints: note that the two variables contains NA values).

(b) Build a scatter plot to visualize the relationship between log_Income and rage (which measures age for each person). What is the relationship between log_Income and rage based on the plot?

(c) When we conduct a statistical test on whether there is a linear association between log_Income and rage, what would be the null and alternative hypothesis? Implement this statistical test and interpret the result.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!