Statistic A
-
Upload
cristi-popa -
Category
Documents
-
view
214 -
download
0
description
Transcript of Statistic A
Proiect statistica - brainhead
Proiectul este bazat pe un set de data privind greutatea si marimea creierului la femei si barbati. Sa se stabileasca daca exista vreo legatura intre marimea si greutatea creierului unei femei si cea a unui barbat.
S-au impartit datele in coloane pentru femei si barbati pentru marime:
>boxplot(barbati,femei)
> par(mfrow=c(2,1))
> hist(barbati)
> hist(femei)
> qqnorm(barbati)
> qqnorm(femei)
> par(mfrow=c(1,1))
> qqnorm(barbati)
> qqline(barbati)
> par(mfrow=c(1,1))
> qqnorm(femei)
> qqline(femei)
> var(barbati)
[1] 725071.7
> var(femei)
[1] 509550.9
> var.test(barbati,femei)
F test to compare two variances
data: barbati and femei
F = 1.423, num df = 133, denom df = 126, p-value = 0.04631
alternative hypothesis: true ratio of variances is not equal to 1
95 percent confidence interval:
1.005825 2.009798
sample estimates:
ratio of variances
1.422962
Vom elimina datele aberante:
> barbatif=barbati[barbati<5000]
> barbatif=barbatif[barbatif>2000]
> var(barbatif)
[1] 106487.9
> femeif=femei[femei<5000]
> femeif=femeif[femeif>2000]
> var(femeif)
[1] 133887.4
> var.test(barbatif,femeif)
F test to compare two variances
data: barbatif and femeif
F = 0.7954, num df = 130, denom df = 124, p-value = 0.1976
alternative hypothesis: true ratio of variances is not equal to 1
95 percent confidence interval:
0.560346 1.127276
sample estimates:
ratio of variances
0.7953541
> t.test(barbatif,femeif)
Welch Two Sample t-test
data: barbatif and femeif
t = 4.5708, df = 247.604, p-value = 7.675e-06
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
112.9047 283.8845
sample estimates:
mean of x mean of y
3794.947 3596.552
> cor.test(set.data[,"greutate"],set.data[,"marime"])
Pearson's product-moment correlation
data: set.data[, "greutate"] and set.data[, "marime"]
t = 7.9442, df = 235, p-value = 8.082e-14
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
0.3534023 0.5550012
sample estimates:
cor
0.4601118
> cor.test(set.data[,"greutate"],set.data[,"marime"])
Pearson's product-moment correlation
data: set.data[, "greutate"] and set.data[, "marime"]
t = 7.9442, df = 235, p-value = 8.082e-14
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
0.3534023 0.5550012
sample estimates:
cor
0.4601118