13.6 - Applicazione: valore medio di una popolazione normale
241
mentre la derivata seconda vale
d
2
d
σ
2
ln
L
(
x
|
H
0
)
=
N
σ
2
−
3
σ
4
∑
i
=
1
N
(
x
i
−
μ
0
)
2
{\displaystyle {\frac {\mathrm {d} ^{2}}{\mathrm {d} \sigma ^{2}}}\,\ln {\mathcal {L}}({\boldsymbol {x}}|H_{0})={\frac {N}{\sigma ^{2}}}-{\frac {3}{\sigma ^{4}}}\sum _{i=1}^{N}\left(x_{i}-\mu _{0}\right)^{2}}
e, calcolata per
σ
=
σ
0
{\displaystyle \sigma =\sigma _{0}}
,
d
2
(
ln
L
)
d
σ
2
|
σ
=
σ
0
=
−
2
N
2
∑
i
(
x
i
−
μ
0
)
2
<
0
{\displaystyle \left.{\frac {\mathrm {d} ^{2}(\ln {\mathcal {L}})}{\mathrm {d} \sigma ^{2}}}\right|_{\sigma =\sigma _{0}}\;=\;-{\frac {2N^{2}}{\sum _{i}\left(x_{i}-\mu _{0}\right)^{2}}}\;<\;0}
per cui l’estremante è effettivamente un massimo. Sostituendo,
ln
L
(
R
^
)
=
−
N
2
ln
[
∑
i
=
1
N
(
x
i
−
μ
0
)
2
]
+
N
2
ln
N
−
N
2
ln
(
2
π
)
−
N
2
{\displaystyle \ln {\mathcal {L}}({\widehat {R}})\;=\;-{\frac {N}{2}}\ln \left[\sum _{i=1}^{N}\left(x_{i}-\mu _{0}\right)^{2}\right]+{\frac {N}{2}}\,\ln N-{\frac {N}{2}}\,\ln(2\pi )-{\frac {N}{2}}}
ln
λ
=
ln
L
(
R
^
)
−
ln
L
(
S
^
)
=
−
N
2
{
ln
[
∑
i
=
1
N
(
x
i
−
μ
0
)
2
]
−
ln
[
∑
i
=
1
N
(
x
i
−
x
¯
)
2
]
}
{\displaystyle \ln \lambda \;=\;\ln {\mathcal {L}}({\widehat {R}})-\ln {\mathcal {L}}({\widehat {S}})\;=\;-{\frac {N}{2}}\left\{\ln \left[\sum _{i=1}^{N}\left(x_{i}-\mu _{0}\right)^{2}\right]-\ln \left[\sum _{i=1}^{N}\left(x_{i}-{\bar {x}}\right)^{2}\right]\right\}}
ed infine
ln
λ
{\displaystyle \ln \lambda }
=
−
N
2
ln
[
∑
i
(
x
i
−
μ
0
)
2
∑
i
(
x
i
−
x
¯
)
2
]
{\displaystyle =-{\frac {N}{2}}\,\ln \left[{\frac {\sum _{i}\left(x_{i}-\mu _{0}\right)^{2}}{\sum _{i}\left(x_{i}-{\bar {x}}\right)^{2}}}\right]}
=
−
N
2
ln
[
1
+
N
(
x
¯
−
μ
0
)
2
∑
i
(
x
i
−
x
¯
)
2
]
{\displaystyle =-{\frac {N}{2}}\,\ln \left[1+{\frac {N\left({\bar {x}}-\mu _{0}\right)^{2}}{\sum _{i}\left(x_{i}-{\bar {x}}\right)^{2}}}\right]}
=
−
N
2
ln
(
1
+
t
2
N
−
1
)
{\displaystyle =-{\frac {N}{2}}\,\ln \left(1+{\frac {t^{2}}{N-1}}\right)}
tenendo conto dapprima del fatto che
∑
i
(
x
i
−
μ
0
)
2
=
∑
i
(
x
i
−
x
¯
)
2
+
N
(
x
¯
−
μ
0
)
2
{\displaystyle \sum _{i}(x_{i}-\mu _{0})^{2}=\sum _{i}(x_{i}-{\bar {x}})^{2}+N({\bar {x}}-\mu _{0})^{2}}
, e
definendo poi una nuova variabile casuale
t
=
(
x
¯
−
μ
0
)
N
(
N
−
1
)
∑
i
(
x
i
−
x
¯
)
2
=
x
¯
−
μ
0
s
N
{\displaystyle t\;=\;\left({\bar {x}}-\mu _{0}\right){\sqrt {\frac {N(N-1)}{\sum _{i}\left(x_{i}-{\bar {x}}\right)^{2}}}}={\frac {{\bar {x}}-\mu _{0}}{\dfrac {s}{\sqrt {N}}}}}
.
Un qualunque metodo per il rigetto di
H
0
{\displaystyle H_{0}}
definito
confrontando
λ
{\displaystyle \lambda }
con un prefissato valore
k
{\displaystyle k}
si traduce, in sostanza, in un corrispondente confronto da
eseguire per
t
{\displaystyle t}
:
R
k
≡
{
ln
λ
<
ln
k
}
{\displaystyle {\mathcal {R}}_{k}\;\equiv \;{\bigl \{}\ln \lambda <\ln k{\bigr \}}}