Nothing Special   »   [go: up one dir, main page]

HW8 2023

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

MAT 201

HOMEWORK 8

1) The daily growth of toe nails is influenced by a number of factors. Age is believed to be
one of them but in unexpected ways. Patrizia Schembri, a podologist researcher, was
interested to see whether there are differences in growth between nails on different fingers.
So she contacted a number of persons of varying ages and made daily measurements on the
first and second fingers of the right hand. The daily increase in millimeters for finger nails 1
and finger nails 2 as well as the age of the person whose fingers were measured and are
given in the table below for 48 different persons.

Age Nail 1 Nail 2 Age Nail 1 Nail 2


8 61 37 55 56 50
20 52 56 62 56 50
22 72 33 19 60 60
20 50 20 20 66 59
15 50 50 6 70 50
10 56 50 8 62 50
35 50 46 26 50 50
39 50 50 30 50 50
41 56 56 6 66 40
14 66 50 65 37 25
44 66 50 93 50 66
25 70 58 25 66 45
5 56 50 91 58 97
8 75 50 19 50 33
3 75 62 90 58 49
10 62 50 19 40 57
32 75 75 90 59 54
6 62 50 20 60 53
15 50 33 18 44 39
26 66 40 90 35 50
34 50 50 91 50 51
58 57 57 19 86 40
28 57 57 21 60 30
28 50 50 19 46 28
i. The first thing Patrizia wanted to test was whether rates of growth of nails on fingers
1 and 2 separately are correlated with age, or between themselves for that matter.
Work out these corresponding correlations and check for significance at the 0.05
level of significance.

Using R, the following figures were calculated between age and growth of nails on
finger 1 and 2:
Correlation between Nail 1 and Age: -0.3486871
Correlation between Nail 2 and Age: 0.314817
Correlation between Nail 1 and Nail 2: 0.190562
Checking for significance at α = 0.05:
P-value for correlation between Nail 1 and Age: 0.01514622
P-value for correlation between Nail 2 and Age: 0.02930413
P-value for correlation between Nail 1 and Nail 2: 0.1945015

Comment:
The correlation between Nail 1 and age shows a significant relationship (p-value:
0.01514622), signifying that the growth of Nail 1 is correlated with age. Similarly,
Nail 2 shows a significant correlation with age (p-value: 0.02930413), indicating age-
related influences on the growth rate of Nail 2. Interestingly, the correlation
between Nail 1 and Nail 2 growth rates is not statistically significant (p-value:
0.1945015), suggesting that the growth rates of these nails are not correlated. This
means that age plays an important role in influencing the growth rates of toenails.
ii. From experience, Patrizia has noticed that it is differential rates of growth which
are really influenced by age. She has observed that the symmetry of the finger nails
is in fact changing considerably as a person gets older. So she has decided to see
how the variable Z = Y =Growth rate of Nail 1−Growth rate of Nail 2 varies with
Age. Perform a linear regression between these two variates and work out all the
necessary parameter estimates and statistics at the 5% level of significance.
[ 14 marks ]
Call:
lm(formula = z ~ corrdata$Age)

Residuals:
Min 1Q Median 3Q Max
-30.849 -8.248 -3.235 8.730 33.617

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 17.80191 2.91886 6.099 2.06e-07 ***
corrdata$Age -0.28520 0.07002 -4.073 0.000181 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 12.81 on 46 degrees of freedom


Multiple R-squared: 0.2651, Adjusted R-squared: 0.2491
F-statistic: 16.59 on 1 and 46 DF, p-value: 0.000181

The linear regression model reveals a significant negative relationship between the
difference in growth rates of Nail 1 and Nail 2 (Z) and individuals' age (Estimate: -
0.28520, p-value: 0.000181). The intercept, 17.80191, represents the estimated
average Z when age is 0. The model explains 26.51% of Z's variability (R²: 0.2651).
The F-statistic is 16.59 with a p-value of 0.000181, indicating the model's overall
significance. Residuals have a standard error of 12.81, signifying the typical deviation
from the regression line. In simple words, age significantly influences the differential
growth rates of toenails, the model provides insights into this relationship.
2. The following readings pertain to employment in the hospitality industry, measured in
terms of number of employees in thousands, within the economy of the KamTam Republic.

1124.263 0.992917 Intercept 1101.66700680272 6.524209 168.8583 6.76E-66 10


1124.948 0.988668 X Variable 1 0.684737299174989 0.239162 2.863065 0.006298 0.
1125.633 0.988511
1126.318 0.962517
1127 0.969297
1127.687 0.978818 RESIDUAL OUTPUT
1128.372 0.989922
1129.056 1.006681 Observation Predicted Y Residuals
1129.741 1.017313 1 1101.66700680272 -37.167
1130.426 1.015723 2 1102.3517441019 -27.8517 Mo
1131.111 1.019971 3 1103.03648140107 -13.0365 Jan
1131.795 1.016085 4 1103.72121870025 -6.32122 Feb
1132.48 0.997192 5 1104.40595599942 4.294044 Ma

i. Establish that there is a linear trend in the figures and estimate it, together with all
accompanying statistics suitably reported and commented.
SUMMARY
OUTPUT

Regression Statistics
0.38890453
Multiple R 9
R Square 0.15124674
Adjusted R 0.13279558
Square 3
Standard
Error 22.9546011
Observations 48

ANOVA
Significance
df SS MS F F
0.00629810
Regression 1 4319.186 4319.186 8.197141 9
Residual 46 24238.03 526.9137
Total 47 28557.22

Standard Upper Lower Upper


Coefficients Error t Stat P-value Lower 95% 95% 95.0% 95.0%
1101.66700 1088.53445
Intercept 7 6.524209 168.8583 6.76E-66 4 1114.8 1088.534 1114.8
0.68473729 0.20332848
X Variable 1 9 0.239162 2.863065 0.006298 7 1.166146 0.203328 1.166146
ii. Work out the predicted values for the trend and hence obtain corresponding indices.
Residual
Observation Predicted Y s
1 1101.667007 -37.167
2 1102.351744 -27.8517
3 1103.036481 -13.0365
4 1103.721219 -6.32122
5 1104.405956 4.294044
6 1105.090693 18.40931
7 1105.775431 28.42457
8 1106.460168 30.93983
9 1107.144905 21.65509
10 1107.829642 -1.02964
11 1108.51438 -4.21438
12 1109.199117 -2.79912
13 1109.883854 -42.8839
14 1110.568592 -27.9686
15 1111.253329 -14.1533
16 1111.938066 9.961934
17 1112.622804 25.4772
18 1113.307541 35.29246
19 1113.992278 34.20772
20 1114.677015 37.02298
21 1115.361753 26.53825
22 1116.04649 5.35351
23 1116.731227 2.568773
24 1117.415965 4.884035
25 1118.100702 -46.6007
26 1118.785439 -35.7854
27 1119.470177 -23.4702
28 1120.154914 -4.15491
29 1120.839651 5.760349
30 1121.524388 12.67561
31 1122.209126 21.49087
32 1122.893863 21.80614
33 1123.5786 14.2214
34 1124.263338 -7.96334
35 1124.948075 -12.7481
36 1125.632812 -12.9328
37 1126.31755 -42.2175
38 1127.002287 -34.6023
39 1127.687024 -23.887
40 1128.371761 -11.3718
41 1129.056499 7.543501
42 1129.741236 19.55876
43 1130.425973 17.77403
44 1131.110711 22.58929
45 1131.795448 18.20455
46 1132.480185 -3.18019
47 1133.164923 -9.96492
48 1133.84966 -0.34966

iii. Compute averaged seasonal indices for the whole year.

Seasonalit
Month y
0.96626 0.96136 0.95832 0.96251
Jan 3 2 2 7 0.962116
0.97473 0.97481 0.96801 0.96929
Feb 4 6 4 7 0.971715
0.98818 0.98726 0.97903 0.97881
Mar 1 4 5 8 0.983324
0.99427 1.00895 0.99629 0.98992
Apr 3 9 1 2 0.997361
1.00388 1.02289 1.00513 1.00668
May 8 8 9 1 1.009652
1.01665 1.03170 1.01130 1.01731
June 9 1 2 3 1.019243
1.02570 1.03070 1.01915 1.01572
Jul 6 7 1 3 1.022822
1.02796 1.03321 1.01997
Aug 3 4 1.01942 1 1.025142
1.01955 1.02379 1.01265 1.01608
Sep 9 3 7 5 1.018024
0.99907 1.00479 0.99291 0.99719
Oct 1 7 7 2 0.998494
0.99619 0.98866 0.99120
Nov 8 1.0023 8 6 0.994593
0.99747 1.00437 0.98851 0.99969
Dec 6 1 1 2 0.997512

You might also like