Call Girl Raipur 📲 9999965857 ヅ10k NiGhT Call Girls In Raipur
Assignment4 ancova
1. Analysis of Covariance’s ANCOVA Biostate Assignment4..
Page 1 of 17
Advance Biostatistics
Topic:Analysis of Variances ANCOVA
Submitted:
Muhammad Shahid
M.Sc.N, Year I, Semester II
Faculty:
Mam Sabah Mughal
Dated:
26-05-2015
2. Analysis of Covariance’s ANCOVA Biostate Assignment4..
Page 2 of 17
Q1. Consider an example,three different machines produce a mono filament fiber for a textile company.
The process engineer is interestedin determining if there is a difference in the breaking strength of the fiber
produced by three machines, however, the strength of a fiber is related to its diameter. A random sample of
five fiber specimen is selected from each machine. The fiber strength (y) and the corresponding
diameter (x) for each specimen are shown in the given table. Analyze the data and an analysis of
covariance.
Assumptions of ANCOVA
Checking Assumption #1
Level of measurement:
1. Our dependentvariableyfiberstrength isquantitative orcontinuous
Factor 3 differentmachine
Covariate:x : diameterisalso continuous.
Checking Assumption #2
Independence of response variable fiber strength y:
Scatter Plot:
Data points are scattered throughout the plot, it means that observation of 15 fiber strength y are
independent.
3. Analysis of Covariance’s ANCOVA Biostate Assignment4..
Page 3 of 17
Checking Assumption #3 Apply Shapiro Wilk test on all continuous variables.
Normality: Response variable should be normally distributed
H0: Data is normally distributed
H1: Data is not normally distributed
Tests of Normality
Factor
Kolmogorov-Smirnova
Shapiro-Wilk
Statistic df Sig. Statistic df Sig.
Strength of fiber (Y) 1 .251 5 .200*
.941 5 .672
2 .206 5 .200*
.943 5 .687
3 .204 5 .200*
.937 5 .642
a. Lilliefors Significance Correction
*. This is a lower bound of the true significance.
Result:
The all p-values are greater than > 0.05, this insignificant result by Shapiro Wilk test shows that
dependent variable Y is normally distributed.
Checking Assumption # 4 Linearity
Relationship of covariate (diameter) and response variable (Fiber Strength)
There is strong linear relationshipbetween the fiber strength y and diameter, and seems appropriate to
remove the effect of diameter on fiber strength by ANCOVA.
4. Analysis of Covariance’s ANCOVA Biostate Assignment4..
Page 4 of 17
5. Run regression to check significant relationship between covariate (x) and response variable (y)
H0: β = 0
H0: β ≠ 0
Coefficientsa
Model
Unstandardized Coefficients
Standardized
Coefficients
t Sig.B Std. Error Beta
1 (Constant) 14.143 2.697 5.243 .000
Corresponding Diameter (X) 1.080 .110 .939 9.804 .000
a. DependentVariable:Strength of fiber (Y)
The p-value is 0.001 which is less than α = 0.05, we conclude that there is significant relationship
between covariate( x) and response variable (y)
Analysis of covariance (ANCOVA)
6. Unadjusted group means
Descriptive Statistics
DependentVariable:Strength of fiber (Y)
Factor Mean Std. Deviation N
1 41.40 4.827 5
2 43.20 3.701 5
3 36.00 3.808 5
Total 40.20 4.974 15
These are the unadjusted means of the strength of fiber (response variable y)
5. Analysis of Covariance’s ANCOVA Biostate Assignment4..
Page 5 of 17
Analysis of covariance (ANCOVA)
Checking Assumption # 7 Apply levene’s Test
H0: Populationvariances are equal
H1: Populationvariances are not equal
Levene's Test of Equality of Error Variancesa
DependentVariable:Strength of fiber (Y)
F df1 df2 Sig.
.052 2 12 .950
Tests the null hypothesis thatthe error variance
of the dependentvariable is equal across groups.
a. Design:Intercept+ Formulation
Result: The p-value is 0.950 which is greater than α = 0.05, we conclude that population variances
are equal.
Analysis of covariance (ANCOVA)
Testing for formulation
Hypothesis testing Steps for ANCOVA.
1. Statement of hypothesis
H0: All meansare equal.
H1:At leasttwo meansare different.
2. Level of significance : α: 0.05
3. Test Statistics: f-test or ANCOVA
4. Critical region: Reject H0: if p-value is ≤ α = 0.05
5. Computation: by SPSS ver 16.
6. Analysis of Covariance’s ANCOVA Biostate Assignment4..
Page 6 of 17
Tests of Between-Subjects Effects
DependentVariable:Strength of fiber (Y)
Source
Type III Sum of
Squares df Mean Square F Sig.
Partial Eta
Squared
Corrected Model 318.414a
3 106.138 41.718 .000 .919
Intercept 96.921 1 96.921 38.095 .000 .776
Diameter X 178.014 1 178.014 69.969 .000 .864
Formulation 13.284 2 6.642 2.611 .118 .322
Error 27.986 11 2.544
Total 24587.000 15
Corrected Total 346.400 14
a. R Squared = .919 (Adjusted R Squared = .897)
6. Conclusion:
Since p-value for formulation is 0.118 greaterthan α (0.05), therefore we cannotreject the H0of no
effectsof formulation, hence thereisnostrongevidence thatthe strength of fiber by different machine is
not different in strength.
Also effect produced by different machines is 0.322 (32 %) so we can say there is no large contribution
produced by different machines in increasing or decreasing the strength of fiber.
Analysis of covariance (ANCOVA)
Testing regression coefficient Slope β:
1. Statement of hypothesis
H0:β 1 = 0
Ha:β 1 ≠ 0
2. Level of significance : α: 0.05
3. Test Statistics: f-test or ANCOVA
4. Critical region: Reject H0: if p-value is ≤ α = 0.05
5. Computation: by SPSSver 16.
7. Analysis of Covariance’s ANCOVA Biostate Assignment4..
Page 7 of 17
Tests of Between-Subjects Effects
DependentVariable:Strength of fiber (Y)
Source
Type III Sum of
Squares df Mean Square F Sig.
Partial Eta
Squared
Corrected Model 318.414a
3 106.138 41.718 .000 .919
Intercept 96.921 1 96.921 38.095 .000 .776
Diameter_X 178.014 1 178.014 69.969 .000 .864
Formulation 13.284 2 6.642 2.611 .118 .322
Error 27.986 11 2.544
Total 24587.000 15
Corrected Total 346.400 14
a. R Squared = .919 (Adjusted R Squared = .897)
Since p-value is 0.001 less than α: 0.05, so we reject the null hypothesis H0:β 1 = 0
, there isa linearrelationshipbetweenstrengthof fiber(y) anddiameterx.
Also effect size for diameter (x) is 0.864 (86.4 %)so we can say that there is large contribution
Diameter in increasing or decreasing the strength of fiber.
` Confirmation of non-significance of formulation by Post Hoc:
Pairwise Comparisons
DependentVariable:Strength of fiber (Y)
(I)
Factor
(J)
Factor
Mean Difference
(I-J) Std. Error Sig.a
95% Confidence Interval for
Differencea
Lower Bound Upper Bound
1 2 -1.037 1.013 .328 -3.266 1.193
3 1.584 1.107 .180 -.853 4.021
2 1 1.037 1.013 .328 -1.193 3.266
3 2.621*
1.148 .043 .095 5.147
3 1 -1.584 1.107 .180 -4.021 .853
2 -2.621*
1.148 .043 -5.147 -.095
Based on estimated marginal means
a. Adjustmentfor multiple comparisons:LeastSignificantDifference (equivalentto no
adjustments).
*. The mean difference is significantatthe .05 level.
Result: None of the pair is significant, the overall none significance of factor formulation.
8. Analysis of Covariance’s ANCOVA Biostate Assignment4..
Page 8 of 17
Now the adjustment provided by the ANCOVA is necessary.
Adjusted means of dependent variable:
Estimates
DependentVariable:Strength of fiber (Y)
Factor Mean Std. Error
95% Confidence Interval
Lower Bound Upper Bound
1 40.382a
.724 38.790 41.975
2 41.419a
.744 39.781 43.058
3 38.798a
.788 37.064 40.532
a. Covariates appearing in the model are evaluated at the following
values:Corresponding Diameter (X) = 24.13.
Group 1: S.E = S.D
S.D = S.E *
S.D = 0.724 * 5 = 1.61
S.D = 1.61
Group 2: S.E = S.D
S.D = S.E *
S.D = 0.724 * 5 = 1.66
S.D = 1.66
Group 3: S.E = S.D
S.D = S.E *
S.D = 0.788 * 5 = 1.76
S.D = 1.76
9. Analysis of Covariance’s ANCOVA Biostate Assignment4..
Page 9 of 17
Unadjusted Means of fiber Strength Adjusted Means of fiber Strength
41.40 40.382a
43.20 41.419a
36.00 38.798a
Comparing the adjusted with unadjusted mean, we note that the adjusted means are much closer
together , another indication that ANCOVA was necessary.
Normality of Residuals: Apply Shapiro Wilk test on residuals
H0: Residualsare normallydistributed
H1: Residualsare notnormallydistributed
Tests of Normality
Kolmogorov-Smirnova
Shapiro-Wilk
Statistic df Sig. Statistic df Sig.
Residual for Fiber_Strength .130 15 .200*
.948 15 .499
a. Lilliefors Significance Correction
*. This is a lower bound of the true significance.
Result: here p-value is 0.499 which is greater than α: 0.05, this insignificant result by ShapiroWilk
testindicates that residuals for fiber strength are normally distributed.
Q2. An engineer is studying the effect of cutting speed on the rate of metal removal in a machining
Operation. However, the rate of metal remover is also related to the hardness of the test specimen.
Five observation are taken at each cutting speed. The amount of metal removal is (y) and the hardness
of the specimen is (x) are shown in the following table. Analyze the data and an analysis of
Covariance, use α= 0.05.
Assumptions of ANCOVA
Checking Assumption #1
Level of measurement:
2. Our dependentvariablethe amount of metal removal y isquantitative orcontinuous
Factor 3 differentcuttingspeed
Covariate:x: hardnessof specimenis alsocontinuous.
10. Analysis of Covariance’s ANCOVA Biostate Assignment4..
Page 10 of 17
Checking Assumption #2
Independence of response variable the amount of metal removal is (y):
Data points are scattered throughout the plot, it means that observation of 15 fiber strength y are
independent.
Checking Assumption #3 Apply Shapiro Wilk test on all continuous variables.
Normality: Response variable should be normally distributed
H0: Data is normally distributed
H1: Data is not normally distributed
Tests of Normality
Factor
Kolmogorov-Smirnova
Shapiro-Wilk
Statistic df Sig. Statistic df Sig.
Amount of Metal Removed
(Y)
1000 .227 5 .200*
.963 5 .831
1200 .145 5 .200*
.981 5 .939
1400 .255 5 .200*
.871 5 .269
a. Lilliefors Significance Correction
*. This is a lower bound of the true significance.
11. Analysis of Covariance’s ANCOVA Biostate Assignment4..
Page 11 of 17
Result:
The all p-values are greater than > 0.05, this insignificant result by Shapiro Wilk test shows that
dependent variable Y is normally distributed.
Checking Assumption # 4 Linearity
Relationship of covariate (hardness of specimen x) and response variable (the amount of metal
removed y).
There is strong linear relationshipbetween the amount of metal removed y and hardness of specimen, and
seems appropriate to remove the effect of hardness of specimenon the amount of metal removed by
ANCOVA.
5. Run regression to check significant relationship between covariate (x) and response variable (y)
H0: β = 0
H0: β ≠ 0
Coefficientsa
Model
Unstandardized Coefficients
Standardized
Coefficients
t Sig.B Std. Error Beta
1 (Constant) -41.059 6.345 -6.471 .000
Hardness ofSpecimen (X) .930 .046 .984 20.214 .000
a. DependentVariable:Amount of Metal Removed (Y)
12. Analysis of Covariance’s ANCOVA Biostate Assignment4..
Page 12 of 17
The p-value is 0.001 which is less than α = 0.05, we conclude that there is significant relationship between
covariate(x) and response variable (y)
Analysis of covariance (ANCOVA)
6. Unadjusted group means:
Descriptive Statistics
DependentVariable:Amountof Metal Removed (Y)
Factor Mean Std. Deviation N
1000 84.20 11.756 5
1200 86.00 18.207 5
1400 89.00 17.578 5
Total 86.40 15.056 15
These are the unadjusted means of the amount of metal removed (response variable y)
7. Checking Assumption # 7 Apply levene’s Test
H0: Populationvariances are equal
H1: Populationvariances are not equal
13. Analysis of Covariance’s ANCOVA Biostate Assignment4..
Page 13 of 17
Levene's Test of Equality of Error Variancesa
DependentVariable:Amountof Metal Removed
(Y)
F df1 df2 Sig.
1.151 2 12 .349
Tests the null hypothesis that the error variance
of the dependentvariable is equal across groups.
a. Design:Intercept+ Hardness_Specimen +
Formulation
Result:
The p-value is 0.950 which is greater than α = 0.05, we conclude that population variancesare equal.
Analysis of covariance (ANCOVA)
Testing for formulation
Hypothesis testing Steps for ANCOVA.
1. Statement of hypothesis
H0: All meansare equal.
H1:At leasttwomeansare different.
2. Level of significance : α: 0.05
3. Test Statistics: f-test or ANCOVA
4. Critical region: Reject H0: if p-value is ≤ α = 0.05
5. Computation: by SPSS ver 16.
14. Analysis of Covariance’s ANCOVA Biostate Assignment4..
Page 14 of 17
Tests of Between-Subjects Effects
DependentVariable:Amountof Metal Removed (Y)
Source
Type III Sum of
Squares df Mean Square F Sig.
Partial Eta
Squared
Corrected Model 3078.149a
3 1026.050 118.244 .000 .970
Intercept 315.626 1 315.626 36.373 .000 .768
Hardness_Specimen 3019.349 1 3019.349 347.956 .000 .969
Formulation 2.404 2 1.202 .139 .872 .025
Error 95.451 11 8.677
Total 115148.000 15
Corrected Total 3173.600 14
a. R Squared = .970 (Adjusted R Squared = .962)
1. Conclusion:
Since p-value for formulation is 0.872 greater than α (0.05), therefore we cannot reject the H0of no
effectsof formulation,hence there is no strong evidence that the amount removed by metal by different
machine is not different in strength.
Also effect produced by different machines is 0.025 (3%) so we can say there is no large contribution
amount of metal removed by in increasing or decreasing the speed of machine.
Analysis of covariance (ANCOVA)
Testing regression coefficient Slope β:
1. Statement of hypothesis
H0:β 1 = 0
Ha:β 1 ≠ 0
2. Level of significance : α: 0.05
3. Test Statistics: f-test or ANCOVA
4. Critical region: Reject H0: if p-value is ≤ α = 0.05
5. Computation: by SPSS ver 16.
15. Analysis of Covariance’s ANCOVA Biostate Assignment4..
Page 15 of 17
Tests of Between-Subjects Effects
DependentVariable:Amountof Metal Removed (Y)
Source
Type III Sum of
Squares df Mean Square F Sig.
Partial Eta
Squared
Corrected Model 3078.149a
3 1026.050 118.244 .000 .970
Intercept 315.626 1 315.626 36.373 .000 .768
Hardness Specimen 3019.349 1 3019.349 347.956 .000 .969
Formulation 2.404 2 1.202 .139 .872 .025
Error 95.451 11 8.677
Total 115148.000 15
Corrected Total 3173.600 14
a. R Squared = .970 (Adjusted R Squared = .962)
Since p-value is 0.001 less than α: 0.05, so we reject the null hypothesis H0:β 1 = 0, there is a linear
relationship between the amount of metal removed (y) and Hardness of specimen x.
Also effect size for diameter (x) is 0.969 (97 %)so we can say that there is large contribution hardness of
specimen in increasing or decreasing the amount of metal removed (y).
`
Confirmation of non-significance of formulation by Post Hoc:
Pairwise Comparisons
DependentVariable:Amountof Metal Removed (Y)
(I)
Factor
(J)
Factor
Mean Difference
(I-J) Std. Error Sig.a
95% Confidence Interval for
Differencea
Lower Bound Upper Bound
1000 1200 .442 1.867 .817 -3.667 4.551
1400 .992 1.889 .610 -3.165 5.150
1200 1000 -.442 1.867 .817 -4.551 3.667
1400 .550 1.873 .774 -3.572 4.672
1400 1000 -.992 1.889 .610 -5.150 3.165
1200 -.550 1.873 .774 -4.672 3.572
Based on estimated marginal means
16. Analysis of Covariance’s ANCOVA Biostate Assignment4..
Page 16 of 17
Pairwise Comparisons
DependentVariable:Amountof Metal Removed (Y)
(I)
Factor
(J)
Factor
Mean Difference
(I-J) Std. Error Sig.a
95% Confidence Interval for
Differencea
Lower Bound Upper Bound
1000 1200 .442 1.867 .817 -3.667 4.551
1400 .992 1.889 .610 -3.165 5.150
1200 1000 -.442 1.867 .817 -4.551 3.667
1400 .550 1.873 .774 -3.572 4.672
1400 1000 -.992 1.889 .610 -5.150 3.165
1200 -.550 1.873 .774 -4.672 3.572
a. Adjustmentfor multiple comparisons:Least SignificantDifference (equivalentto no
adjustments).
Result: None of the pair is significant, the overall none significance of factor formulation.
Now the adjustment provided by the ANCOVA is necessary.
Adjusted means of dependent variable:
Estimates
DependentVariable:Amountof Metal Removed (Y)
Factor Mean Std. Error
95% Confidence Interval
Lower Bound Upper Bound
1000 86.878a
1.325 83.962 89.795
1200 86.436a
1.318 83.536 89.336
1400 85.886a
1.328 82.963 88.809
a. Covariates appearing in the model are evaluated at the following
values:Hardness ofSpecimen (X) = 137.07.
Group 1: S.E = S.D
S.D = S.E *
S.D = 1.325*5 = 2.23
17. Analysis of Covariance’s ANCOVA Biostate Assignment4..
Page 17 of 17
S.D = 2.95
Group 2: S.E = S.D
S.D = S.E *
S.D = 1.318 * 5 = 2.23
S.D = 2.93
Group 3: S.E = S.D
S.D = S.E *
S.D = 1.328 * 5 = 2.23
S.D = 2.96
Unadjusted Means of Amount of Metal
Removed (Y)
Adjusted Means of Amount of Metal
Removed (Y)
84.20 86.878a
86.00 86.436a
89.00 85.886a
Comparing the adjusted with unadjusted mean, we note that the adjusted means are much closer
together, another indication that ANCOVA was necessary.
The end