Hypothesis tests · Pruebas de hipótesis
| English | Español |
|---|---|
| hypothesis test/haɪˈpɒθəsɪs test/ | prueba de hipótesis |
| null hypothesis/nʌl haɪˈpɒθəsɪs/ | hipótesis nula |
| alternative/ɔːlˈtɜːnətɪv/ | alternativo |
| one-tailed/wʌn teɪld/ | unilateral |
| two-tailed/tuː teɪld/ | bilateral |
| significance level/sɪɡˈnɪfɪkəns ˈlevl/ | nivel de significancia |
| test statistic/test stəˈtɪstɪk/ | estadístico de prueba |
| rejection region/rɪˈdʒekʃn ˈriːdʒn/ | zona de rechazo |
| critical value/ˈkrɪtɪkl ˈvæljuː/ | valor crítico |
| Type I error/taɪp aɪ ˈerə/ | error Tipo I |
| Type II error/taɪp ˈtuː ˈerə/ | error Tipo II |
The courtroom of statistics
- A drug company claims their new medicine works better than the old one. How do you decide if the evidence is strong enough?
- Hypothesis testing 假设检验 is the statistical equivalent of a courtroom: you assume the defendant (the null hypothesis 原假设) is innocent until proven guilty beyond reasonable doubt.
El tribunal de la estadística
- Una empresa farmacéutica afirma que su nuevo medicamento funciona mejor que el antiguo. ¿Cómo decides si la evidencia es lo suficientemente fuerte?
- La prueba de hipótesis 假设检验 es el equivalente estadístico de un tribunal: asumes que el acusado (la hipótesis nula 原假设) es inocente hasta que se demuestre su culpabilidad más allá de toda duda razonable.
Setting up the hypotheses
- A hypothesis test uses sample data to judge a claim.
- The null hypothesis $H_0$ — the default position (usually "no change" or "no effect").
- The alternative 备择假设 $H_1$ — what you suspect is true.
- One-tailed 单尾 if $H_1$ points one way ($\mu > 50$); two-tailed 双尾 if both ($\mu \neq 50$).
Worked example. A machine fills bottles with 500 mL. You suspect it's underfilling. $H_0: \mu = 500$ (machine is correct). $H_1: \mu < 500$ (underfilling). This is a one-tailed test.
A two-tailed 5% test rejects H0 in the shaded tails beyond plus or minus 1.96
Estableciendo las hipótesis
- Una prueba de hipótesis utiliza datos muestrales para evaluar una afirmación.
- La hipótesis nula $H_0$ — la posición por defecto (generalmente "sin cambio" o "sin efecto").
- La hipótesis alternativa 备择假设 $H_1$ — lo que sospechas que es verdadero.
- De una cola 单尾 si $H_1$ apunta en una dirección ($\mu > 50$); de dos colas 双尾 si ambas ($\mu \neq 50$).
Ejemplo resuelto. Una máquina rellena botellas con 500 mL. Sospechas que está rellenando en exceso. $H_0: \mu = 500$ (la máquina está correcta). $H_1: \mu < 500$ (relleno insuficiente). Esta es una prueba de una cola.

Una prueba de dos colas al 5% rechaza H0 en las colas sombreadas más allá de más o menos 1,96
The rejection region · La región de rechazo
reject H₀ if z < −z* · rechazar H₀ si z < −z*
The shaded tail is the rejection region — if the test statistic lands there, reject H₀. · La cola sombreada es la región de rechazo — si el estadístico de prueba cae allí, rechaza H₀.
The null hypothesis H₀ usually states that: · La hipótesis nula H₀ generalmente establece que:
H₀ is the claim being tested, usually "no change"; H₁ is the suspected alternative. · H₀ es la afirmación que se pone a prueba, generalmente "sin cambio"; H₁ es la alternativa sospechada.
If H₁ states μ > 50, the test is: · Si H₁ establece μ > 50, la prueba es:
H₁ pointing in one direction (μ > 50 or μ < 50) makes it a one-tailed test. · Que H₁ apunte en una dirección (μ > 50 o μ < 50) la convierte en una prueba unilateral.
Running the test
- Fix a significance level 显著性水平 (often 5%), compute a test statistic 检验统计量, and see if it lands in the rejection region 拒绝域.
- If $|z|$ exceeds the critical value 临界值 (1.96 for 5% two-tailed, 1.645 for 5% one-tailed), reject $H_0$.
A one-tailed test at 5% rejects H₀ only if the test statistic lands in the shaded tail.
Significance level is NOT the probability that $H_0$ is true. A 5% significance level means: if $H_0$ is true, there's a 5% chance of getting data this extreme. It does NOT mean there's a 5% chance $H_0$ is true.
Realizando la prueba
- Establece un nivel de significancia 显著性水平 (a menudo 5%), calcula una estadística de prueba 检验统计量 y verifica si cae en la zona de rechazo 拒绝域.
- Si $|z|$ supera el valor crítico 临界值 (1,96 para dos colas al 5%, 1,645 para una cola al 5%), rechaza $H_0$.

Una prueba de una cola al 5% rechaza H₀ solo si la estadística de prueba cae en la cola sombreada.
El nivel de significancia NO es la probabilidad de que $H_0$ sea verdadera. Un nivel de significancia del 5% significa que: si $H_0$ es verdadera, hay un 5% de probabilidad de obtener datos tan extremos. NO significa que haya un 5% de probabilidad de que $H_0$ sea verdadera.
Types of error
- Type I error 第一类错误: rejecting $H_0$ when it is true (false positive). Probability = significance level $\alpha$.
- Type II error 第二类错误: accepting $H_0$ when it is false (false negative).
Tipos de error
- Error Tipo I 第一类错误: rechazar $H_0$ cuando es verdadera (falso positivo). Probabilidad = nivel de significancia $\alpha$.
- Error Tipo II 第二类错误: aceptar $H_0$ cuando es falsa (falso negativo).
A Type I error is: · Un error Tipo I es:
Type I = reject a true H₀; Type II = accept a false H₀. · Tipo I = rechazar una H₀ verdadera; Tipo II = aceptar una H₀ falsa.
A Type II error means accepting H₀ when it is actually false. · Un error Tipo II significa aceptar H₀ cuando en realidad es falso.
Type II = fail to reject a false H₀ (false negative). · Tipo II = no rechazar una H₀ falsa (falso negativo).
Worked example — z-test
- $H_0: \mu = 50$, $H_1: \mu \neq 50$ (two-tailed, 5% level). $\sigma = 8$, $n = 64$, $\bar{x} = 52$.
- $z = \dfrac{52 - 50}{8/\sqrt{64}} = \dfrac{2}{1} = 2$.
- Critical value for 5% two-tailed: $1.96$. Since $2 > 1.96$, reject $H_0$.
- Set a null and alternative hypothesis; the test statistic falls in the critical region (reject) or the acceptance region. A Type II error is accepting a false $H_0$. Tests may use a binomial or Poisson distribution.
Ejemplo resuelto — prueba z
- $H_0: \mu = 50$, $H_1: \mu \neq 50$ (dos colas, nivel del 5%). $\sigma = 8$, $n = 64$, $\bar{x} = 52$.
- $z = \dfrac{52 - 50}{8/\sqrt{64}} = \dfrac{2}{1} = 2$.
- Valor crítico para dos colas al 5%: $1.96$. Dado que $2 > 1.96$, rechazamos $H_0$.
- Establece una hipótesis nula y una hipótesis alternativa; la estadística de prueba cae en la zona crítica (rechazo) o en la zona de aceptación. Un Error Tipo II es aceptar una $H_0$ falsa. Las pruebas pueden utilizar una distribución binomial o de Poisson.
Population mean claimed 50, σ = 8, sample n = 64, x̄ = 52. What is z = (x̄ − μ)/(σ/√n)? · Media poblacional afirmada 50, σ = 8, muestra n = 64, x̄ = 52. ¿Cuál es z = (x̄ − μ)/(σ/√n)?
z = (52 − 50)/(8/√64) = 2/(8/8) = 2/1 = 2.
For a 5% two-tailed test, you reject H₀ if |z| > 1.96. · Para una prueba bilateral del 5%, rechaza H₀ si |z| > 1.96.
The critical value for a 5% two-tailed test is 1.96. If |z| exceeds this, reject H₀. · El valor crítico para una prueba bilateral del 5% es 1.96. Si |z| supera esto, rechaza H₀.
You've got it
- $H_0$ (no change) vs $H_1$ (suspected); one- or two-tailed
- test statistic $z = \dfrac{\bar{x} - \mu}{\sigma/\sqrt{n}}$; reject $H_0$ if it's in the rejection region
- Type I = reject a true $H_0$; Type II = accept a false $H_0$
Lo has logrado
- $H_0$ (sin cambio) frente a $H_1$ (sospechado); de una o de dos colas
- estadística de prueba $z = \dfrac{\bar{x} - \mu}{\sigma/\sqrt{n}}$; rechaza $H_0$ si está en la zona de rechazo
- Tipo I = rechazar una $H_0$ verdadera; Tipo II = aceptar una $H_0$ falsa