• Non ci sono risultati.

var mortality durezza_acqua

N/A
N/A
Protected

Academic year: 2021

Condividi "var mortality durezza_acqua"

Copied!
5
0
0

Testo completo

(1)

Regressione in SAS : Proc Reg

I dati da analizzare si riferiscono ad un’indagine condotta su 61 città di Inghilterra e Galles riguardante l’indice annuale di mortalità su 100.000 abitanti maschi calcolato come media degli anni dal 1958 al 1964 e la concentrazione di calcio (in parti per milione) dell’acqua potabile. Le città sono classificate come “Nord” se sono a nord della città di Derby, altrimenti sono classificate come “Sud”.

I dati sono contenuti nel file regressione.xls e riportati nell’utima pagina.

Le domande a cui si cerca di rispondere sono :

• Le variabili Mortality e Durezza acqua sono correlate?

• Esiste un fattore geografico nella relazione?

Il DataSet SAS si chiama Water ed è stato costruito importando i dati dal file excel regressione.xls . STEP 1 : Analisi descrittiva delle variabili

La Proc Univariate permette di determinare il valore dei principali indici statistici e inserendo l’opzione normal viene effettuato un test di bontà di adattamento della distribuzione dei dati ad una normale.

Proc Univariate data=water normal;

var mortality durezza_acqua;

histogram mortality durezza_acqua /normal;

run;

L’output della procedura è il seguente :

The UNIVARIATE Procedure Variable: mortality (mortality)

Moments

N 61 Sum Weights 61 Mean 1524.14754 Sum Observations 92973 Std Deviation 187.668754 Variance 35219.5612 Skewness -0.0844436 Kurtosis -0.4879484 Uncorrected SS 143817743 Corrected SS 2113173.67 Coeff Variation 12.3130307 Std Error Mean 24.0285217

Basic Statistical Measures

Location Variability

Mean 1524.148 Std Deviation 187.66875 Median 1555.000 Variance 35220 Mode 1486.000 Range 891.00000 Interquartile Range 289.00000

NOTE: The mode displayed is the smallest of 3 modes with a count of 2.

Tests for Location: Mu0=0

Test -Statistic- ---p Value---

Student's t t 63.43077 Pr > |t| <.0001 Sign M 30.5 Pr >= |M| <.0001 Signed Rank S 945.5 Pr >= |S| <.0001

Tests for Normality

Test --Statistic--- ---p Value--- Shapiro-Wilk W 0.985543 Pr < W 0.6884

(2)

Quantile Estimate

100% Max 1987

99% 1987

95% 1800

90% 1742

75% Q3 1668

50% Median 1555

25% Q1 1379

10% 1259

5% 1247

1% 1096

0% Min 1096

Extreme Observations ----Lowest---- ----Highest--- Value Obs Value Obs 1096 26 1772 29

1175 38 1800 4

1236 42 1807 7

1247 1 1828 30

1254 15 1987 45

Parameter Symbol Estimate Mean Mu 1524.148 Std Dev Sigma 187.6688 Goodness-of-Fit Tests for Normal Distribution Test ---Statistic---- ---p Value--- Kolmogorov-Smirnov D 0.07348799 Pr > D >0.150 Cramer-von Mises W-Sq 0.04868837 Pr > W-Sq >0.250 Anderson-Darling A-Sq 0.33739780 Pr > A-Sq >0.250 Quantiles for Normal Distribution ---Quantile--- Percent Observed Estimated 1.0 1096.00 1087.56 5.0 1247.00 1215.46 10.0 1259.00 1283.64 25.0 1379.00 1397.57 50.0 1555.00 1524.15 75.0 1668.00 1650.73 90.0 1742.00 1764.65 95.0 1800.00 1832.84 99.0 1987.00 1960.73 The UNIVARIATE Procedure Variable: durezza_acqua (durezza acqua) Moments N 61 Sum Weights 61

Mean 47.1803279 Sum Observations 2878

Std Deviation 38.0939664 Variance 1451.15027 Skewness 0.69223461 Kurtosis -0.6657553 Uncorrected SS 222854 Corrected SS 87069.0164 Coeff Variation 80.7412074 Std Error Mean 4.8774326 Basic Statistical Measures Location Variability Mean 47.18033 Std Deviation 38.09397 Median 39.00000 Variance 1451 Mode 14.00000 Range 133.00000 Interquartile Range 61.00000

Tests for Location: Mu0=0

Test -Statistic- ---p Value---

Student's t t 9.673189 Pr > |t| <.0001 Sign M 30.5 Pr >= |M| <.0001 Signed Rank S 945.5 Pr >= |S| <.0001

Tests for Normality

Test --Statistic--- ---p Value--- Shapiro-Wilk W 0.887867 Pr < W <0.0001

(3)

Quantiles (Definition 5)

Quantile Estimate

100% Max 138

99% 138

95% 122

90% 101

75% Q3 75

50% Median 39

25% Q1 14

10% 8

5% 6

1% 5

0% Min 5

Extreme Observations ----Lowest---- ----Highest--- Value Obs Value Obs 5 39 107 38

5 3 122 19

6 41 122 59

6 37 133 35

8 45 138 26

Parameters for Normal Distribution

Parameter Symbol Estimate

Mean Mu 47.18033 Std Dev Sigma 38.09397

Goodness-of-Fit Tests for Normal Distribution Test ---Statistic---- ---p Value---

Kolmogorov-Smirnov D 0.19666241 Pr > D <0.010 Cramer-von Mises W-Sq 0.39400529 Pr > W-Sq <0.005 Anderson-Darling A-Sq 2.39960138 Pr > A-Sq <0.005

Quantiles for Normal Distribution

---Quantile--- Percent Observed Estimated

1.0 5.00000 -41.43949 5.0 6.00000 -15.47867 10.0 8.00000 -1.63905 25.0 14.00000 21.48634 50.0 39.00000 47.18033 75.0 75.00000 72.87432 90.0 101.00000 95.99971 95.0 122.00000 109.83933 99.0 138.00000 135.80015

STEP 2 : RAPPRESENTAZIONE GRAFICA

La rappresentazione grafica che permette di esaminare la relazione fra le due variabili Mortality e Durezza_acqua è lo scatterplot. Il programma SAS è il seguente :

proc gplot data=water;

plot mortality*durezza_acqua;

run;

mor t al i t y

1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000

dur ezza acqua

0 10 20 30 40 50 60 70 80 90 100 110 120 130 140

Alcune opzioni grafiche permettono di ottenere un grafico più leggibile permettendo di suddividere le osservazioni fra Nord e Sud.

symbol1 v=dot c=blue;

symbol2 v=star c=red;

proc gplot data=water;

plot mortality*durezza_acqua=zona;

run;

zona nor d sud

mor t al i t y

1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000

dur ezza acqua

0 10 20 30 40 50 60 70 80 90 100 110 120 130 140

(4)

Lo scatterplot sembra mettere in evidenza un correlazione negativa fra le due variabili. La procedura Corr permette di calcolare la correlazione fra mortality e durezza_acqua.

Programma SAS

proc corr data=water pearson;

var mortality durezza_acqua;

by zona;run;

Output SAS

The CORR Procedure

2 Variables: mortality durezza_acqua

Simple Statistics

Variable N Mean Std Dev Sum Minimum Maximum

mortality 61 1524 187.66875 92973 1096 1987 durezza_acqua 61 47.18033 38.09397 2878 5.00000 138.00000

Pearson Correlation Coefficients, N = 61

durezza_

mortality acqua

mortality 1.00000 -0.65485 durezza_acqua -0.65485 1.00000

Con l’istruzione by della procedura Corr viene calcolata la correlazione suddividendo i dati fra Nord e Sud.

proc sort data= water ; by zona;

proc corr data= water pearson;

var mortality durezza_acqua;

by zona;

run;

--- zona=nord --- The CORR Procedure

2 Variables: mortality durezza_acqua Simple Statistics

Variable N Mean Std Dev Sum Minimum Maximum

mortality 26 1377 140.26918 35797 1096 1627 durezza_acqua 26 69.76923 40.36068 1814 5.00000 138.00000

Pearson Correlation Coefficients, N = 26 durezza_

mortality acqua

mortality 1.00000 -0.60215 durezza_acqua -0.60215 1.00000

--- zona=sud ---

The CORR Procedure

2 Variables: mortality durezza_acqua Simple Statistics

Variable N Mean Std Dev Sum Minimum Maximum

mortality 35 1634 136.93691 57176 1378 1987 durezza_acqua 35 30.40000 26.13449 1064 6.00000 94.00000

Pearson Correlation Coefficients, N = 35 durezza_

mortality acqua

mortality 1.00000 -0.36860 durezza_acqua -0.36860 1.00000

(5)

zona citta mortality durezza acqua

nord Bath 1247 105

sud Birkenhead 1668 17

nord Birmingham 1466 5

sud Blackburn 1800 14

sud Blackpool 1609 18

sud Bolton 1558 10

sud Bootle 1807 15

nord Bournemouth 1299 78

sud Bradford 1637 10

nord Brighton 1359 84

nord Bristol 1392 73

sud Burnley 1755 12

nord Cardiff 1519 21

nord Coventry 1307 78

nord Croydon 1254 96

sud Darlington 1491 20

sud Derby 1555 39

sud Doncaster 1428 39

nord East 1318 122

nord Exeter 1260 21

sud Gateshead 1723 44

sud Grimsby 1379 94

sud Halifax 1742 8

sud Huddersfield 1574 9

sud Hull 1569 91

nord Ipswich 1096 138

sud Leeds 1591 16

nord Leicester 1402 37

sud Liverpool 1772 15

sud Manchester 1828 8

sud Middlesbrough 1704 26

sud Newcastle 1702 44

nord Newport 1581 14

nord Northampton 1309 59

nord Norwich 1259 133

sud Nottingham 1427 27

sud Oldham 1724 6

nord Oxford 1175 107

nord Plymouth 1486 5

nord Portsmouth 1456 90

sud Preston 1696 6

nord Reading 1236 101

sud Rochdale 1711 13

sud Rotherham 1444 14

sud Salford 1987 8

sud Sheffield 1495 14

sud South Shields 1713 71

nord Southampton 1369 68

nord Southend 1257 50

sud Southport 1587 75

sud St Helens 1591 49

sud Stockport 1557 13

sud Stoke 1640 57

sud Sunderland 1709 71

nord Swansea 1625 13

sud Wallasey 1625 20

nord Walsall 1527 60

nord West Brom 1627 53

nord West Ham 1486 122

nord Wolverhampton 1485 81

sud York 1378 71

Riferimenti

Documenti correlati

Alla base delle scelte c'era la convinzione che creare economie di scala (concentrare molte piccole imprese in poche di grandi dimensioni) e di scopo (integrare tra loro attività

n L’analisi stagionale della mortalità in 32 città evidenzia nel- la popolazione di 65+ anni un incremento significativo della mortalità nel 2015 sia nel periodo invernale

più della metà dei maschi non aveva avuto un esame fisico o test del cole- sterolo; tra gli uomini sopra i 50 anni, il 41% non si era sottoposto a scree- ning per il cancro

This explaination is in opposition with the large existing literature on rapidly pitching airfoils and wings, where it is generally accepted that a hysteretic behavior can

(m aUDE , 2010) 8. Lo strumento di tracciamento di B UDDi faceva bella mostra di sé sulla copertina del rapporto di Policy Exchange. al centro dell’argomentazione provocatoria

[r]

Basilicata Puglia Calabria Sardegna Sicilia Abruzzo Molise Campania Trentino AA Valle d'Aosta Veneto Marche Umbria Toscana Lazio Friuli VG Liguria Lombardia Piemonte

CONDIZIONI OPERATIVE = rumorosità di fondo; nessuna utenza in servizio... CONDIZIONI OPERATIVE = in servizio unicamente il