Escolar Documentos
Profissional Documentos
Cultura Documentos
Is a one IV ANOVA
IV: Nominal (called as factor with levels)
DV: Ratio
2. Hypothesis:
H0: No difference between Loan Sanctioned for the Type of Owners
Ha: There is a difference between Loan Sanctioned for at least one Type of Owner
3. Assumptions:
1. Normality: ANOVA Applicable mainly for Normal data
QQ Plot
> s.mort = subset(s,home_ownership==MORTGAGE")
> qqnorm(s.mort$funded_amnt)
> qqline(s.mort$funded_amnt)
> hist(s.mort$funded_amnt)
3. Independence of Observations:
Other variable should not have effect on another variable
We dont want same person to have in mortgage list and own list.
It will make H0 true as same population will have data twice.
Summary Table
Source
Variatio
n
df
Between
SS
MS
dfbetw SSbetw
een
een
MSbet
ween
Within
dfwithi SSwithi
n
n
MSwith
in
Total
dftotal
SStotal
Sum Sq
Mean Sq
F value Pr(>F)
Effect Size:
R2 = (F*dfbetween)/(F*dfbetween+dfwithin)
R2 = 0.053
Alternatively;
R2 = SSa+SSb+SSa*b/SStotal
Power
> library(pwr)
> f2 = R2/(1 - R2)
> pwr.f2.test(df.between,df.within,f2)
Multiple regression power calculation
u=2
v = 397
f2 = 0.05551637
sig.level = 0.05
power = 0.9916698
ANOVA Correction
Bonferroni Correction
Familywise error/#tests
0.05/3 = 0.017
Pairwise t-tests
>pairwise.t.test(s$funded_amnt,s$home_ownership,p.adj
="bonferroni")
Conclusion:
Pairwise comparisons showed that
Those with mortgages were given greater loans than those who
owned outright ($15,470 vs. $10,596; p = 0.003).
Those with mortgages were given greater loans than those who
rented ($15,470 vs. $12,396; p < 0.001)