Assignment 1
Question 1
Dr. Brown is trying to better understand depression in boys and girls. She measures depression in 15 boys and 15 girls in grade 4. The obtained scores were:
Boys
|
15
|
12
|
9
|
5
|
18
|
14
|
10
|
11
|
7
|
5
|
6
|
3
|
9
|
15
|
11
|
Girls
|
11
|
21
|
18
|
15
|
12
|
22
|
20
|
19
|
21
|
22
|
20
|
18
|
24
|
17
|
4
|
a) By hand, calculate the 20% trimmed mean, median absolute deviation, and variance of depression scores in boys. Show your work.
Ordered:
Boys: 3, 5, 6, 7, 9, 9, 10, 11, 11, 12, 14, 15, 15, 18
Girls: 4, 11, 12, 15, 17, 18, 18, 19, 20, 20, 21, 22, 22, 24
Means:
Boys: x- = Σx/n = 150/15 = 10
Girls: x- = Σx/n = 242/15 = 16.13
Medians:
Boys: 10
Girls: 19
Trimmed mean:
15(0.2) = 3 → Eliminate 3, 5, 5 and 15, 15, 18
89/9 = 9.89
Median Absolute Deviation
MAD = (|x - |)/n
=52/15
= 3.47
Standard Deviation
σ = √Σ(x - )2/(n - 1)
=√262/14 = √18.71 = 4.326
Variance
σ/ = 4.326/10 = 0.4326
b)
c)
d)
>pnorm(1.156, lower.tail = FALSE)
[1] 0.1238406
>pnorm(0.462, lower.tail = FALSE)
[1] 0.3220407
>pnorm(1.3870, lower.tail = FALSE)
[1] 0.08272088
> .32304-.0827
[1] 0.24034
> .32204-.0827
[1] 0.23934
Question 2
Dr. Black is investigating the relationship between the number of errors students make in solving math questions and perfectionism. The data is available on Moodle (2021_ass1_q2_data.csv).
a) Create a scatterplot of the relationship and describe the nature of the relationship.
b) Convert all scores to z-scores and compute the correlation using ??=Σzxzy/N-1_. Verify your computation using the cor() function.
Attachment:- data.csv