20.06.2013 Views

Dispensa di modelli lineari in R - Dipartimento di Statistica

Dispensa di modelli lineari in R - Dipartimento di Statistica

Dispensa di modelli lineari in R - Dipartimento di Statistica

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CAPITOLO 6. TEST T DI STUDENT 54<br />

Frequency<br />

Sample Quantiles<br />

0 2 4 6 8<br />

15 25 35 45<br />

Histogram of RS<br />

10 20 30 40<br />

●<br />

RS<br />

Normal Q−Q Plot<br />

● ●<br />

●<br />

●<br />

●●<br />

●<br />

●<br />

●●●<br />

●<br />

● ●<br />

●<br />

●<br />

●●<br />

● ●<br />

●<br />

−2 −1 0 1 2<br />

Theoretical Quantiles<br />

●<br />

Frequency<br />

Sample Quantiles<br />

0 2 4 6<br />

10 30 50<br />

Histogram of SS<br />

10 20 30 40 50<br />

●<br />

SS<br />

Normal Q−Q Plot<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

● ●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

● ●<br />

●<br />

−2 −1 0 1 2<br />

Theoretical Quantiles<br />

Figura 6.2: Istogrammi e qq-plot per le l<strong>in</strong>ee RS e SS.<br />

> test test<br />

Two Sample t-test<br />

data: RS and SS<br />

t = 0.6521, df = 48, p-value = 0.5175<br />

alternative hypothesis: true <strong>di</strong>fference <strong>in</strong> means is not equal to 0<br />

95 percent confidence <strong>in</strong>terval:<br />

-3.3919 6.6479<br />

sample estimates:<br />

mean of x mean of y<br />

25.256 23.628<br />

La quantità t riporta il valore osservato della statistica test, t oss ; df sono i gra<strong>di</strong> <strong>di</strong><br />

libertà della <strong>di</strong>stribuzione della statistica test sotto H0 (<strong>in</strong> questo caso n1 + n2 − 2 =<br />

25 + 25 − 2 = 48); p-value è il livello <strong>di</strong> significatività osservato quando l’ipotesi<br />

alternativa è bilaterale H1 : µRS = µSS, α oss = 2 PrH0(t > |t oss |), con t ∼ t48 sotto<br />

H0. Infatti:<br />

> 2 * (1 - pt(test$statistic, test$parameter))<br />

t<br />

0.51747<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!