En un estudio, 39 de 215 pacientes tenían asma. Testear la h que la p de un paciente aleatorio sea 15%
prop.test(39, 215, .15)
1-sample proportions test with continuity correction
data: 39 out of 215, null probability 0.15
X-squared = 1.425, df = 1, p-value = 0.2326
alternative hypothesis: true p is not equal to 0.15
95 percent confidence interval:
0.1335937 0.2408799
sample estimates:
p
0.1813953
binom.test(39, 215, 0.15)
Exact binomial test
data: 39 and 215
number of successes = 39, number of trials = 215, p-value = 0.2135
alternative hypothesis: true probability of success is not equal to 0.15
95 percent confidence interval:
0.1322842 0.2395223
sample estimates:
probability of success
0.1813953
exito <- c(9, 4)
total <- c(12, 13)
prop.test(exito, total)
2-sample test for equality of proportions with continuity correction
data: exito out of total
X-squared = 3.2793, df = 1, p-value = 0.07016
alternative hypothesis: two.sided
95 percent confidence interval:
0.01151032 0.87310506
sample estimates:
prop 1 prop 2
0.7500000 0.3076923
exito2 <- c(90, 40)
total2 <- c(120, 130)
prop.test(exito2, total2)
2-sample test for equality of proportions with continuity correction
data: exito2 out of total2
X-squared = 47.153, df = 1, p-value = 6.566e-12
alternative hypothesis: two.sided
95 percent confidence interval:
0.3234035 0.5612118
sample estimates:
prop 1 prop 2
0.7500000 0.3076923
datos <- matrix(c(9,4,3,9), 2)
chisq.test(datos)
Pearson's Chi-squared test with Yates' continuity correction
data: datos
X-squared = 3.2793, df = 1, p-value = 0.07016
datos2 <- matrix(c(90,40,30,90), 2)
mosaicplot(datos)
mosaicplot(datos2)
chisq.test(datos)
Pearson's Chi-squared test with Yates' continuity correction
data: datos
X-squared = 3.2793, df = 1, p-value = 0.07016
chisq.test(datos2)
Pearson's Chi-squared test with Yates' continuity correction
data: datos2
X-squared = 47.153, df = 1, p-value = 6.566e-12
Prolonged effect of a mother-child caries preventive program on dental caries in the permanent 1st molars in 9 to 10-year-old children Santiago S. Gomez, Claes-Göran Emilson, Adriana A. Weber & Sergio Uribe Acta Odontologica Scandinavica Vol. 65 , Iss. 5,2007
prop.test(sincaries, total)
2-sample test for equality of proportions with continuity correction
data: sincaries out of total
X-squared = 16.242, df = 1, p-value = 5.574e-05
alternative hypothesis: two.sided
95 percent confidence interval:
0.1338814 0.3861186
sample estimates:
prop 1 prop 2
0.87 0.61