t de student
DESCRIPTION
Probabilidad y estadísticaTRANSCRIPT
![Page 1: T de Student](https://reader034.vdocuments.co/reader034/viewer/2022042603/563db93e550346aa9a9b7751/html5/thumbnails/1.jpg)
T-Student
![Page 2: T de Student](https://reader034.vdocuments.co/reader034/viewer/2022042603/563db93e550346aa9a9b7751/html5/thumbnails/2.jpg)
RECORDANDO ……
![Page 3: T de Student](https://reader034.vdocuments.co/reader034/viewer/2022042603/563db93e550346aa9a9b7751/html5/thumbnails/3.jpg)
DISTRIBUCION t STUDENT
![Page 4: T de Student](https://reader034.vdocuments.co/reader034/viewer/2022042603/563db93e550346aa9a9b7751/html5/thumbnails/4.jpg)
Con el trabajo del Químico y Matemático ingles, WilliamSealeyGosset, escrito bajo el seudónimo de “Student”, se dispone de otra distribución conocida como distribución t de student, abreviada como distribución t”La distribución esta dada por la cantidad:
nsxt
n-1 G.L
![Page 5: T de Student](https://reader034.vdocuments.co/reader034/viewer/2022042603/563db93e550346aa9a9b7751/html5/thumbnails/5.jpg)
PROPIEDADES: Tiene µ=0 La variable t va de - ∞ hasta + ∞ Es una familia de distribuciones
30 gl
5 gl
2 gl
< Variabilidad
> Variabilidad
µ =0
![Page 6: T de Student](https://reader034.vdocuments.co/reader034/viewer/2022042603/563db93e550346aa9a9b7751/html5/thumbnails/6.jpg)
Es menos espigada y las colas mas alargadas.En comparación con la normal
Distribución normal
Distribución t student
µ =0
![Page 7: T de Student](https://reader034.vdocuments.co/reader034/viewer/2022042603/563db93e550346aa9a9b7751/html5/thumbnails/7.jpg)
PRUEBA t STUDENT Comparación de dos poblaciones
independientes. Variable dicotómica y continua.
SUPUESTOS
Normalidad: En cada grupo Varianza desconocida: Iguales o
diferentes
![Page 8: T de Student](https://reader034.vdocuments.co/reader034/viewer/2022042603/563db93e550346aa9a9b7751/html5/thumbnails/8.jpg)
Normalidad
Estadísticas descriptivas
Gráficos
Test de normalidad
![Page 9: T de Student](https://reader034.vdocuments.co/reader034/viewer/2022042603/563db93e550346aa9a9b7751/html5/thumbnails/9.jpg)
Continuación …….sum pad if fuma==0,d presion arterial diastolica (mmHg)------------------------------------------------------------- Percentiles Smallest 1% 46.35056 46.35056 5% 57.5482 55.0555110% 61.07764 57.41988 Obs 7725% 71.8108 57.5482 Sum of Wgt. 7750% 79.01965 Mean 79.3093 Largest Std. Dev. 12.726575% 88.69038 100.060690% 96.8728 102.9899 Variance 161.963995% 100.0606 106.0554 Skewness .015276799% 108.78 108.78 Kurtosis 2.752186
. sum pad if fuma==1,d presion arterial diastolica (mmHg)------------------------------------------------------------- Percentiles Smallest 1% 71.04926 71.04926 5% 73.80067 73.8006710% 77.62933 77.62933 Obs 2325% 79.18894 78.72028 Sum of Wgt. 2350% 87.62447 Mean 87.70633 Largest Std. Dev. 9.01378975% 94.48155 99.3406290% 99.43048 99.43048 Variance 81.2483895% 100.4205 100.4205 Skewness -.039837499% 102.0454 102.0454 Kurtosis 1.918243
![Page 10: T de Student](https://reader034.vdocuments.co/reader034/viewer/2022042603/563db93e550346aa9a9b7751/html5/thumbnails/10.jpg)
. histogram pad if fuma==0, frequency normal bin(10) title(Presion Arterial Diastolica en no fumadores)
. histogram pad if fuma==1, frequency normal bin(8) title(Presion Arterial Diastolica en fumadores)
Continuación …….0
12
34
Freq
uenc
y
70 80 90 100 110presion arterial diastolica (mmHg)
Presion Arterial Diastolica en fumadores
05
1015
20Fr
eque
ncy
40 60 80 100 120presion arterial diastolica (mmHg)
Presion Arterial Diastolica en no fumadores
![Page 11: T de Student](https://reader034.vdocuments.co/reader034/viewer/2022042603/563db93e550346aa9a9b7751/html5/thumbnails/11.jpg)
bysort fuma: swilk pad
-> fuma = 0
Shapiro-Wilk W test for normal data Variable | Obs W V z Prob>z-------------+--------------------------------- pad | 77 0.99243 0.503 -1.501 0.93330
-> fuma = 1
Shapiro-Wilk W test for normal data Variable | Obs W V z Prob>z-------------+--------------------------------- pad | 23 0.96218 0.989 -0.022 0.50883
Continuación …….
Ho: La variable pad tiene distribución normal
H1: La variable pad no tiene distribución normal.
![Page 12: T de Student](https://reader034.vdocuments.co/reader034/viewer/2022042603/563db93e550346aa9a9b7751/html5/thumbnails/12.jpg)
Varianzas iguales o diferentes
22
21
ss
RV
. sdtest pad,by(fuma)
Variance ratio test
Group | Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]---------+--------------------------------------------------- 0 | 77 79.3093 1.45032 12.7265 76.42074 82.19786 1 | 23 87.70633 1.879505 9.013789 83.80847 91.60418---------+---------------------------------------------------combined | 100 81.24062 1.245008 12.45008 78.77025 83.71098------------------------------------------------------------- ratio = sd(0) / sd(1) f = 1.9934Ho: ratio = 1 degrees of freedom = 76, 22
Ha: ratio < 1 Ha: ratio != 1 Ha: ratio > 1 Pr(F < f) = 0.9648 2*Pr(F > f) = 0.0703 Pr(F > f) = 0.0352
1: 22
21
0
H 1: 22
21
1
H
![Page 13: T de Student](https://reader034.vdocuments.co/reader034/viewer/2022042603/563db93e550346aa9a9b7751/html5/thumbnails/13.jpg)
Dos formas de realizar la prueba t student:Prueba t student para varianzas iguales
211
21
222
2112
nn
SnSnS p
Donde:
2
2
1
202121
nS
nS
XXt
pp
g.l.221 nn
Ho: La presión arterial diastólica es igual entre los fumadores y los no fumadores.H1: La presión arterial diastólica no es igual entre los fumadores y los no fumadores.
![Page 14: T de Student](https://reader034.vdocuments.co/reader034/viewer/2022042603/563db93e550346aa9a9b7751/html5/thumbnails/14.jpg)
en stata:. ttest pad, by(fuma)
Two-sample t test with equal variances------------------------------------------------------------------------------ Group | Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]---------+-------------------------------------------------------------------- 0 | 77 79.3093 1.45032 12.7265 76.42074 82.19786 1 | 23 87.70633 1.879505 9.013789 83.80847 91.60418---------+--------------------------------------------------------------------combined | 100 81.24062 1.245008 12.45008 78.77025 83.71098---------+-------------------------------------------------------------------- diff | -8.397025 2.849947 -14.05265 -2.741399------------------------------------------------------------------------------ diff = mean(0) - mean(1) t = -2.9464Ho: diff = 0 degrees of freedom = 98
Ha: diff < 0 Ha: diff != 0 Ha: diff > 0 Pr(T < t) = 0.0020 Pr(|T| > |t|) = 0.0040 Pr(T > t) = 0.9980
Continuación …….
“Con una probabilidad de 0.0040 se concluye que la presión arterial diastolica es diferente en cada grupo de tabaquismo.”
![Page 15: T de Student](https://reader034.vdocuments.co/reader034/viewer/2022042603/563db93e550346aa9a9b7751/html5/thumbnails/15.jpg)
Continuación …….
Prueba t student para varianzas diferentes
2
22
1
21
02121
nS
nSXX
t
21
2211)2/(1
ttt
)2/(11 tt1
21
1 nS
2
22
2 nS
)2/(12 ttDonde:
para n1-1 grados de libertad
para n2-1 grados de libertad
![Page 16: T de Student](https://reader034.vdocuments.co/reader034/viewer/2022042603/563db93e550346aa9a9b7751/html5/thumbnails/16.jpg)
. ttest pad, by(fuma) unequal
Two-sample t test with unequal variances------------------------------------------------------------------------------ Group | Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]---------+-------------------------------------------------------------------- 0 | 77 79.3093 1.45032 12.7265 76.42074 82.19786 1 | 23 87.70633 1.879505 9.013789 83.80847 91.60418---------+--------------------------------------------------------------------combined | 100 81.24062 1.245008 12.45008 78.77025 83.71098---------+-------------------------------------------------------------------- diff | -8.397025 2.374019 -13.16355 -3.630498------------------------------------------------------------------------------ diff = mean(0) - mean(1) t = -3.5371Ho: diff = 0 Satterthwaite's degrees of freedom = 50.7872
Ha: diff < 0 Ha: diff != 0 Ha: diff > 0 Pr(T < t) = 0.0004 Pr(|T| > |t|) = 0.0009 Pr(T > t) = 0.9996
en stata: Continuación …….
“Concluimos que la presión arterial diastólica es diferente entre los fumadores y los no fumadores”.
![Page 17: T de Student](https://reader034.vdocuments.co/reader034/viewer/2022042603/563db93e550346aa9a9b7751/html5/thumbnails/17.jpg)
¿Cómo compararía las medias entre tres o mas grupos o categorías?
OJO...........En términos de la prueba t student.
………….. ENTONCES
![Page 18: T de Student](https://reader034.vdocuments.co/reader034/viewer/2022042603/563db93e550346aa9a9b7751/html5/thumbnails/18.jpg)
Comparando 2 poblaciones a la vez
Continuación …….
■ Por ejemplo: Comparar 5 poblaciones (suponiendo que son iguales)
5C2 =10
HACER 10 PRUEBAS t STUDENT
![Page 19: T de Student](https://reader034.vdocuments.co/reader034/viewer/2022042603/563db93e550346aa9a9b7751/html5/thumbnails/19.jpg)
CONCLUSIÓN FALSA.
Cuando se comparan dos medias a nivel de significación α, la probabilidad de cometer un error de tipo I es α.
Cuando se comparan de a dos a medias tenemos comparaciones posibles.
Probabilidad de cometer un erro tipo I:1-[(1-α) ]
aC2
aC2
![Page 20: T de Student](https://reader034.vdocuments.co/reader034/viewer/2022042603/563db93e550346aa9a9b7751/html5/thumbnails/20.jpg)
Para 5 grupos tenemos 10 comparaciones posibles, para un α = 0,05 :
P(x>0)=1-[(1-0,05)^10]= 0,40 Probabilidad de no rechazar una hipótesis
de no diferencia en cada caso seria de 0.95.(0.95)10 = 0.5987
Rechazar la hipótesis nula: Error tipo I
![Page 21: T de Student](https://reader034.vdocuments.co/reader034/viewer/2022042603/563db93e550346aa9a9b7751/html5/thumbnails/21.jpg)
Lo mas grave: Muestras no independientes.
Necesitamos un mejor método para comparar mas de 2 poblaciones.
ANOVA