Este documento describe los métodos para estimar intervalos de confianza y realizar pruebas de hipótesis sobre parámetros poblacionales como la media. Explica cómo calcular el margen de error e intervalos de confianza para la media cuando la desviación estándar es conocida o desconocida, utilizando distribuciones normales o t de Student. También cubre los pasos para realizar pruebas de hipótesis, incluyendo la formulación de hipótesis nulas y alternativas, y el cálculo de valores críticos y valores p para
1. Sesión 6
Pruebas de Hipótesis
de una población
Estadística en las organizaciones
AD4001
Dr. Jorge Ramírez Medina
2. Una estimación del intervalo se puede calcular
por sumar y restar un margen de error del estimador
puntual:
Estimador puntual +/- Margen de Error
Margen de Error y
estimación de intervalos
Por ejemplo la forma general de una estimación del
intervalo para una media poblacional es:
Margen de Error
Dr Jorge Ramírez Medina
EGADE Business School
x
3. • Estimación de intervalo de m
donde: es la media muestral
1 - es el coeficiente de confidencia
z/2 es el valor z que provee un área de
/2 en la cola superior de la distribución
de probabilidad normal estandarizada
s es la desviación estándar de la población
n es el tamaño de la muestra
Estimación de intervalo de la
media de una Población : s
conocida
x
Dr Jorge Ramírez Medina
EGADE Business School
n
zx
s
2/
5. Caso de s conocida
s raramente se conoce con exactitud, se
pueden obtener estimados de datos
históricos.
El margen de error puede ser calculado con:
– La desviación estándar de la población s , o
– La desviación estándar de la muestra s
Dr Jorge Ramírez Medina
EGADE Business School
8. • Ejemplo: DiscoSuena
Estimación de intervalo de la
media de una Población : s
conocida
n=36
U= $31,100
S= $4,500
Intervalo de confianza del 95%
x
s
Dr Jorge Ramírez Medina
EGADE Business School
9. 95% de las medias muestrales, están dentro de
un + 1.96 de la media poblacional m.sx
El margen de error es:
Estimación de intervalo de la
media de una Población : s
conocida
La estimación del intervalo para m es:
$31,100 + $1,470
o
$29,630 to $32,570
470,1
36
500,4
96.12/
n
z
s
Dr Jorge Ramírez Medina
EGADE Business School
10. • Selección del tamaño de la muestra
en la mayoría de las aplicaciones, un tamaño de
muestra de n = 30 es adecuado.
Si la distribución de la población es de un alto sesgo
o contiene outliers, se recomienda un tamaño de
muestra de 50 ó más.
Estimación de intervalo de la
media de una Población : s
conocida
Dr Jorge Ramírez Medina
EGADE Business School
11. • Selección del tamaño de la muestra
si la población no está normalmente distribuida pero
es simétrica (+/-) un tamaño de muestra pequeño
de 15 es suficiente.
Si se cree que la distribución de la población es
aproximadamente normal, se puede utilizar un
tamaño de muestra de menos de 15.
Estimación de intervalo de la
media de una Población : s
conocida
Dr Jorge Ramírez Medina
EGADE Business School
12. Estimación de intervalo de la
media de una Población : s
desconocida
Dr Jorge Ramírez Medina
EGADE Business School
Si no se puede tener un estimado de la desviación
estándar de la población s, se utiliza la
desviación estándar s de la muestra para estimar s .
En este caso, la estimación del intervalo para m
está basada en la distribución t.
13. La distribución t es una familia de distribuciones de
probabilidad similares.
Una distribución t específica depende de un
parámetro conocido como grados de libertad.
Los grados de libertad se refieren a el número de
piezas independientes de información que se usan
en el cálculo de s.
Distribución t
Dr Jorge Ramírez Medina
EGADE Business School
14. Conforme la distribución t tiene más grados de
libertad, ésta tiene menos dispersión.
Conforme se incrementan los grados de libertad,
la diferencia entre la distribución t y la distribución
de probabilidad normal estandarizada se hace más
pequeña.
Distribución t
William Sealy Gosset
Dr Jorge Ramírez Medina
EGADE Business School
17. Para más de 100 grados de libertad, el valor de z
normal estandarizado, da una buena aproximación
del valor t.
Los valores z normal estandarizados, se pueden
encontrar en la tabla t, con infinito grados de libertad.
Distribución t
Dr Jorge Ramírez Medina
EGADE Business School
18. Degrees Area in Upper Tail
of Freedom .20 .10 .05 .025 .01 .005
. . . . . . .
50 .849 1.299 1.676 2.009 2.403 2.678
60 .848 1.296 1.671 2.000 2.390 2.660
80 .846 1.292 1.664 1.990 2.374 2.639
100 .845 1.290 1.660 1.984 2.364 2.626
.842 1.282 1.645 1.960 2.326 2.576
Valores z
normal estandarizados
Distribución t
Dr Jorge Ramírez Medina
EGADE Business School
19. Pruebas de Hipótesis
Dr. Jorge Ramírez Medina
EGADE Business School
x
Intervalo de confianza
Tamaño de la muestra
x
Error
90 IC
20. Pruebas de hipótesis
• Una cola
– Cola superior
– Cola inferior
s conocida
s desconocida
• Dos colas
s conocida
s desconocida
Dr Jorge Ramírez Medina
EGADE Business School
1
Reject H0
Do Not Reject H0
z
21. Hipótesis nula y alternativa
Hypothesis testing can be used to determine whether
a statement about the value of a population parameter
should or should not be rejected.
The null hypothesis, denoted by H0 , is a tentative
assumption about a population parameter.
The alternative hypothesis, denoted by Ha, is the
opposite of what is stated in the null hypothesis.
The alternative hypothesis is what the test is
attempting to establish.
Dr Jorge Ramírez Medina
EGADE Business School
22. One-tailed
(lower-tail)
One-tailed
(upper-tail)
Two-tailed
Summary of Forms for Null and Alternative
Hypotheses about a Population Mean
The equality part of the hypotheses always appears
in the null hypothesis.
In general, a hypothesis test about the value of a
population mean m must take one of the following
three forms (where m0 is the hypothesized value of
the population mean).
Dr Jorge Ramírez Medina
EGADE Business School
0 0:H m m
0:aH m m
0 0:H m m
0:aH m m
0 0:H m m
0:aH m m
23. Demostración en
Mathematica
Dr. Jorge Ramírez Medina
ITESM EGADE
test type:
H0: 0
Ha : 0
H0: 0
Ha : 0
H0: 0
Ha : 0
sample size 0
population variance
random seed
24. • Testing Research Hypotheses
Planteamiento de Hipótesis
• The research hypothesis should be expressed as
the alternative hypothesis.
• The conclusion that the research hypothesis is true
comes from sample data that contradict the null
hypothesis.
Dr Jorge Ramírez Medina
EGADE Business School
26. Type I and Type II Errors
Correct
Decision
Type II Error
Correct
Decision
Type I Error
Reject H0
(Conclude m > 12)
Accept H0
(Conclude m < 12)
H0 True
(m < 12)
H0 False
(m > 12)Conclusion
Population Condition
Dr Jorge Ramírez Medina
EGADE Business School
Errores
27. Error Tipo I
Because hypothesis tests are based on sample data,
we must allow for the possibility of errors.
A Type I error is rejecting H0 when it is true
The probability of making a Type I error when the
null hypothesis is true as an equality is called the
level of significance.
Applications of hypothesis testing that only control
the Type I error are often called significance tests.
Dr Jorge Ramírez Medina
EGADE Business School
28. A Type II error is accepting H0 when it is false.
It is difficult to control for the probability of making
a Type II error.
Statisticians avoid the risk of making a Type II
error by using “do not reject H0” and not “accept H0”.
Error Tipo II
Dr Jorge Ramírez Medina
EGADE Business School
29. The rejection rule:
Reject H0 if the p-value < .
Compute the p-value using the following three steps:
3. Double the tail area obtained in step 2 to obtain
the p –value.
2. If z is in the upper tail (z > 0), find the area under
the standard normal curve to the right of z.
If z is in the lower tail (z < 0), find the area under
the standard normal curve to the left of z.
1. Compute the value of the test statistic z.
p-Value para la prueba de
Hipótesis de dos colas
Dr Jorge Ramírez Medina
EGADE Business School
30. The critical values will occur in both the lower and
upper tails of the standard normal curve.
The rejection rule is:
Reject H0 if z < -z/2 or z > z/2.
Use the standard normal probability distribution
table to find z/2 (the z-value with an area of /2 in
the upper tail of the distribution).
p-Value para la prueba de
Hipótesis de dos colas
Dr Jorge Ramírez Medina
EGADE Business School
31. Step 1. Develop the null and alternative hypotheses.
Step 2. Specify the level of significance .
Step 3. Collect the sample data and compute the test
statistic.
p-Value Approach
Step 4. Use the value of the test statistic to compute the
p-value.
Step 5. Reject H0 if p-value < .
Pasos de la prueba de Hipótesis
Dr Jorge Ramírez Medina
EGADE Business School
32. Critical Value Approach
Step 4. Use the level of significance to determine
the critical value and the rejection rule.
Step 5. Use the value of the test statistic and the
rejection
rule to determine whether to reject H0.
Pasos de la prueba de Hipótesis
Dr Jorge Ramírez Medina
EGADE Business School
33. Ejemplo: Pasta de dientes
• Two-Tailed Test About a Population Mean: s Known
Quality assurance procedures call for
the continuation of the filling process if the
sample results are consistent with the assumption that
the mean filling weight for the population of toothpaste
tubes is 6 oz.; otherwise the process will be adjusted.
The production line for Glow toothpaste
is designed to fill tubes with a mean weight
of 6 oz. Periodically, a sample of 30 tubes
will be selected in order to check the
filling process.
Dr Jorge Ramírez Medina
EGADE Business School
34. Two-Tailed Test About a Population Mean: s Known
Perform a hypothesis test, at the .03
level of significance, to help determine
whether the filling process should continue
operating or be stopped and corrected.
Assume that a sample of 30 toothpaste
tubes provides a sample mean of 6.1 oz.
The population standard deviation is
believed to be 0.2 oz.
Ejemplo: Pasta de dientes
Dr Jorge Ramírez Medina
EGADE Business School
35. 1. Determine the hypotheses.
2. Specify the level of significance.
3. Compute the value of the test statistic.
= .03
p –Value and Critical Value Approaches
H0: m 6
Ha: 6m
Prueba de dos colas de µ:
s conocida
Dr Jorge Ramírez Medina
EGADE Business School
74.2
302.
61.6
n
xz
/
0
s
m
36. 5. Determine whether to reject H0.
p –Value Approach
4. Compute the p –value.
For z = 2.74, cumulative probability = .9969
p–value = 2(1 .9969) = .0062
Because p–value = .0062 < = .03, we reject H0.
We are at least 97% confident that the mean
filling weight of the toothpaste tubes is not 6 oz.
Prueba de dos colas de µ:
s conocida
Dr Jorge Ramírez Medina
EGADE Business School
37. e Approach
/2 =
.015
0
z/2 = 2.17
z
/2 =
.015
-z/2 = -2.17
z = 3.425z = -3.425
1/2
p -value
= .0031
1/2
p -value
= .0031
Prueba de dos colas de µ:
s conocida
Dr Jorge Ramírez Medina
EGADE Business School
38. Prueba de dos colas de µ:
s conocida
Dr Jorge Ramírez Medina
EGADE Business School
Critical Value Approach
5. Determine whether to reject H0.
We are at least 97% confident that the mean
filling weight of the toothpaste tubes is not 6 oz.
Because 2.47 > 2.17, we reject H0.
For /2 = .03/2 = .015, z.015 = 2.17
4. Determine the critical value and rejection rule.
Reject H0 if z < -2.17 or z > 2.17
39. Prueba de dos colas de µ:
s conocida
Dr Jorge Ramírez Medina
EGADE Business School
/2 = .015
0 2.17
Reject H0Do Not Reject H0
z
Reject H0
-2.17
Critical Value Approach
Sampling
distribution
of
/2 = .015
n
xz
/
0
s
m
40. Prueba de Hipótesis de µ:
s desconocida
• Test Statistic
Dr Jorge Ramírez Medina
EGADE Business School
This test statistic has a t distribution
with n - 1 degrees of freedom.
t
x
s n
m0
/
41. Rejection Rule: p -Value Approach
H0: m m Reject H0 if t > t
Reject H0 if t < -t
Reject H0 if t < - t or t > t
H0: m m
H0: m m
Rejection Rule: Critical Value Approach
Reject H0 if p –value <
Prueba de Hipótesis de µ:
s desconocida
Dr Jorge Ramírez Medina
EGADE Business School
42. A State Highway Patrol periodically samples
vehicle speeds at various locations
on a particular roadway.
The sample of vehicle speeds
is used to test the hypothesis
Ejemplo: Los federales
The locations where H0 is rejected are deemed
the best locations for radar traps.
H0: m < 65
Dr Jorge Ramírez Medina
EGADE Business School
43. At Location F, a sample of 64 vehicles shows a
mean speed of 66.2 mph with a
standard deviation of
4.2 mph. Use = .05 to
test the hypothesis.
Ejemplo: Los federales
Dr Jorge Ramírez Medina
EGADE Business School
44. 1. Determine the hypotheses.
2. Specify the level of significance.
3. Compute the value of the test statistic.
= .05
H0: m < 65
Ha: m > 65
m
0 66.2 65
2.286
/ 4.2/ 64
x
t
s n
Prueba de una cola de µ:
s desconocida
Dr Jorge Ramírez Medina
EGADE Business School
45. p –Value Approach
5. Determine whether to reject H0.
4. Compute the p –value.
For t = 2.286, the p–value must be less than .025
(for t = 1.998) and greater than .01 (for t = 2.387).
.01 < p–value < .025
Because p–value < = .05, we reject H0.
We are at least 95% confident that the mean speed
of vehicles at Location F is greater than 65 mph.
Prueba de una cola de µ:
s desconocida
Dr Jorge Ramírez Medina
EGADE Business School
46. Critical Value Approach
5. Determine whether to reject H0.
We are at least 95% confident that the mean speed
of vehicles at Location F is greater than 65 mph.
Location F is a good candidate for a radar trap.
Because 2.286 > 1.669, we reject H0.
For = .05 and d.f. = 64 – 1 = 63, t.05 = 1.669
4. Determine the critical value and rejection rule.
Reject H0 if t > 1.669
Prueba de una cola de µ:
s desconocida
Dr Jorge Ramírez Medina
EGADE Business School
47.
0 t =
1.669
Reject H0
Do Not Reject H0
t
Prueba de una cola de µ:
s desconocida
Dr Jorge Ramírez Medina
EGADE Business School