Post on 26-Dec-2015
Using Statistical Methods for Environmental Science and Management
Graham McBride, NIWA, Hamiltong.mcbride@niwa.co.nz
Statistics Teachers’ Day, 25 November 2008
What do statisticians really do?
• Separate randomness from pattern
• Make inferences about the world, based on data from samples
• Help to design sampling programmes (use resources efficiently)
• Help to establish cause and effect
• Can’t “prove anything with statistics”
THE ROLE OF STATISTICAL THE ROLE OF STATISTICAL METHODS: MY VIEWMETHODS: MY VIEW
There are three kinds of lies– lies, damned lies, and statistics
Who said that?– Mark Twain (1835 – 1910)
“Figures often beguile me, particularly when I have the arranging of them myself”
– Benjamin Disraeli (1804 – 1881)Sought to discredit true British soldier casualty figures in the Crimean War (1853 – 1856)
Who came first? (Twain cites Disraeli!)
““Three kinds of lies”Three kinds of lies”InsultInsult, or , or complimentcompliment??
What you should do
• Establish the context of your work (what do people want to know, and why do they want to know that?)
• Consult with others, e.g., to discuss whether a proposed sampling programme can actually be done
• Discuss the appropriate burden-of-proof (e.g., drinking water standards minimise the consumer’s risk, not the producer’s risk)
What you should not do
• Confuse association and causation (pp. 267-8 of Barton, Sigma Mathematics)
• Ignore other lines-of-evidence (Bradford-Hill criteria), such as – Can the cause reach the location of the effect?– Is the finding plausible? – Can you explain inconsistencies with other evidence?
• Be ignorant of how statistical procedures work– The computer said so
What you should not do
• Believe that there is only one “statistically correct” way of analysing data– There are lots of good ways; many more bad
and wrong ways too
• Not consider bias and imprecision in your data
Bias and Imprecision
INACCURATE INACCURATE INACCURATE ACCURATE
(a) Biased, imprecise (b) Unbiased, imprecise (c) Biased, precise (d) Unbiased, precise
What you might have to do
• Use non-standard methods, e.g.,– non-parametric (rank) methods for highly skewed data
(very common in aquatic studies)• e.g., linear trend or monotonic trend?
• Read rather widely– Statistics is not a cut-and-dried subject; there are still
some fundamental debates about statistical inference, especially the Bayesians versus the frequentists—both approaches have their place
What you also might have to do
• Answer this question: “What is P” – Result of a hypothesis test– Used (over-used!) routinely, so you’ll need to
know• P = Prob(data at least as extreme if the tested
hypothesis is true)
• Not the probability of the truth of the hypothesis
• Relate results to confidence intervals
EXAMPLEEXAMPLEIncreasing pressure on freshwatersIncreasing pressure on freshwaters
Is there evidence of associated deterioration (or improvements) in rivers?
0
100000
200000
300000
400000
500000
600000
19
88
19
89
19
90
19
91
19
92
19
93
19
94
19
95
19
96
19
97
19
98
19
99
20
00
20
01
20
02
20
03
Fe
rtil
ize
r c
on
su
mp
tio
n (
ton
ne
s)1
0
0.5
1
1.5
2
2.5
3
3.5
4
Co
w n
um
be
rs (
mil
lio
ns
)2
Total Nitrogen
Total Phosphorus
Cows
Data source: 1Fertilizer consumption – UN Food & Agriculture Organisation2Cows –Livestock Improvement NZ Dairy Statistics
GOAL
To provide scientifically defensible information on the important physical, chemical, and biological characteristics of a selection of the nation’s rivers as a basis for advising the Minister of Science and other Ministers of the Crown of the trends and status of these waters
OBJECTIVES
1. Detect significant trends in water quality
2. Develop better understanding of water resources, and hence to better assist their management
A National River Water Quality A National River Water Quality Network for New Zealand (1989)Network for New Zealand (1989)
• 77 sites on 35 rivers
• All sites have reliable flow data
• Sites are sampled by regional Field Teams
• 14 WQ parameters (monthly)
• Data available (search for WQIS www.niwa.co.nz
NRWQNNRWQNstructurestructure
Correlations with % Pasture
Temperature 0.50***
Conductivity 0.55***
pH -0.19
Dissolved oxygen -0.17
Visual clarity -0.60***
NOx-N 0.71***
NH4-N 0.77***
Total nitrogen 0.84***
DRP 0.67***
Total phosphorus 0.74***
E. coli 0.79****** P < 0.001; Spearman rank correlation
WQ state & land WQ state & land useuse
WQ Trends 1989-2005
• Calculated annual medians from monthly data at each site for each parameter
• Took the 77 datapoints for each year and calculated the 5th, 50th, and 95th percentile values
• The 50th percentile gives us a picture of what is happening in a national “average” river in terms of annual median water quality data
• The 5th and 95th percentiles tell us about changes over time in our “best” and “worst” rivers.
• Trends in these values were assessed using the Spearman rank correlation coefficient (rS).
NONOxx-N Trends 1989-2005-N Trends 1989-2005
0
200
400
600
800
1000
120019
88
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
Year
NO
x -N
(m
g/m
3 )
5th 50th 95th
Concentrations of NOx-N increased dramatically between 1989 & 2005 in our most enriched rivers
Trends 1989-20055th 50th 95th
TEMP 0.70 0.33 0.28
COND 0.30 0.48 0.22
PH -0.27 -0.11 -0.64
DO -0.09 -0.25 -0.11
CLAR 0.13 0.39 0.44
NOx-N -0.81 0.37 0.80
NH4-N -0.96 -0.94 0.44
TN 0.39 0.59 0.71
DRP -0.26 0.48 0.05
TP -0.10 0.24 -0.37
BOD5 -0.75 -0.88 -0.70
Results indicative of:
• Warming in our coolest rivers
• Drops in pH
• Increasing nitrogen enrichment
• Decreases in BOD5 most rivers
Trends 1989-2003• More formal analysis of trends carried out on monthly data (1989-2003) at all 77 sites• Seasonal Kendall test• Data were flow-adjusted using LOWESS (many WQ parameters can be strongly influenced by discharge)• Used a binomial test to indicate a “national trend”• Discriminate between “significant” (i.e. P < 0.05) and “meaningful” trends (i.e., P < 0.05 and slope > 1% of
median value per annum).
Trends in TN
Total nitrogen exhibited a strong increasing trend at the national scale during 1989-2003 (P < 0.001).
Increasing trends in TN were particularly evident in the South Island, where 25 of 33 sites showed meaningful increases.
Trends in DRP
There was a strong national trend of increasing DRP concentrations during 1989-2003 (P < 0.001).
This result contrasts with the relatively weak trends observed for 1989-2005.
Summary of trends 1989-2003
No significant trend Significant improving trend Significant deteriorating trend
Plot 1
Temp Cond pH DO Clar NOx-N NH4-N TN DRP TP BOD5
RS
KS
E
-15
-10
-5
0
5
10
15
Links between land use and trends
The magnitude of trends in DRP increase with % pastoral land use
y = 0.0406x - 0.0027
R2 = 0.31
-4
-2
0
2
4
6
8
10
0 10 20 30 40 50 60 70 80 90 100
% Pastoral land use
Tre
nd
in
Dis
solv
ed R
eact
ive
Ph
osp
oh
oru
s (S
KS
E
as %
of
med
ian
)
LowerManawatu Rv.
Land use and trends
0.180.31Total phosphorus
0.480.59Dissolved reactive phosphorus
-0.010.35Total nitrogen
0.680.29Ammoniacal nitrogen
0.230.30Oxidised nitrogen
-0.11-0.26Visual clarity
-0.27-0.27Dissolved oxygen
-0.28-0.28pH
0.400.47Conductivity
0.200.19Temperature
RSKSESKSEParameter
Spearman rank correlation coefficients (bold P < 0.01)
Conclusions• Strong associations between nutrient concentrations and
%pastoral land cover at the national scale (State)• Rivers draining large areas of pastoral land have
deteriorated significantly over the last 17 years with respect to nitrogen concentrations (Trends)
• The magnitude of trends in some parameters is associated with extent of pastoral land use
• Decreasing trends in NH4-N and BOD5 indicative of improvements in point source management
• Increasing trends in nutrients indicative of increasing pressure from agriculture
EXAMPLE:Water quality-human health risk assessment, quantitative approach
Christchurch City Wastewater Outfall
Quantitative Microbial Health Risk Assessment (QMHRA)
• Identify hazards (pathogens)
• Quantify exposure (swimming, shellfish consumption)
• Assess dose-response
• Characterise risk
Hazard vs. Risk
• Hazards can cause harm, after exposure
• Risk cannot occur if no exposure
• Can have hazard without risk
• But not vice versa!
Christchurch hazards—viruses only
From an extensive list (next slide):
• Swimming– adenovirus (respiratory)– rotavirus– enterovirus (Echovirus 12)
• Shellfish consumption (raw)– enteroviruses– rotavirus– hepatitis A
Pathogen Main disease caused Comments Include?
Bacteria
Campylobacter spp. Gastroenteritis Poor survival in seawater No
Pathogenic E. coli Gastroenteritis Low concentration expected in sewage No
Legionella pneumophila Legionnaires' disease No evidence of environmental infection route
No
Leptospira sp. Leptospirosis Low concentration expected in sewage No
Salmonella sp. Gastroenteritis Low concentration expected in sewage No
Salmonella typhi Typhoid fever Rare in New Zealand No
Shigella sp. Dysentery Low concentration expected in sewage No
Vibrio cholerae Cholera Rare in New Zealand No
Yersinia enterolitica Gastroenteritis Low concentration expected in sewage No
Helminths
Ascaris lumbricoides Roundworm Rare in New Zealand No
Enterobius vernicularis Pinworm Low concentration expected in sewage No
Fasciola hepatica Liver fluke Rare in New Zealand No
Hymnolepis nana Dwarf tapeworm Rare in New Zealand No
Taenia sp. Tapeworm Rare in New Zealand No
Trichuris trichiura Whipworm Rare in New Zealand No
Protozoa
Balantidium coli Dysentery Low concentration expected in sewage No
Cryptosporidium oocysts Gastroenteritis Can accumulate in shellfish, but virus groups of more concern
No
Entamoeba histolytica Amoebic dysentery Rare in New Zealand No
Giardia cysts Gastroenteritis Poor survival in seawater No
Viruses
adenoviruses Respiratory disease2 Very infective, present in substantial concentrations in raw sewage
Yes (SW only)1
enteroviruses Gastroenteritis Less infective, but health consequences can be more severe than adenovirus
Yes (SW and SF)
hepatitis A virus Infectious hepatitis Low sewage concentration; very infective Can affect surfers in contaminated waters4
Yes (SF)
noroviruses3 Gastroenteritis No reliable method for viability enumeration; limited data on occurrence in water and infectivity.
No
rotaviruses Gastroenteritis Limited evidence of waterborne infection in NZ; infection in children would be of concern.5
Yes (SF and SW)
Dose-response curves
0 20 40 60 80 100
rotavirus
Dose
Variable susceptibility
0
0.2
0.4
0.6
0.8
1
0 2 4 6 8 10
adenovirus
Pro
bab
ility
of
infe
ctio
n
Dose
Constant susceptibility
Accounting for variability and uncertainty
• Exposure is variable– e.g., individuals’ swim duration
• Dose-response is uncertain– only some pathogen strains in clinical trials– trials limited to healthy adults
• Describe using statistical distributions in a Monte Carlo analysis
Scenariosis!• 1,000 people; 1,000 occasions
– 8 beaches– 2 influent virus conditions (normal & outbreak)– 2 seasons summer/winter– 3 viruses for 2 activities– 2 outfall lengths– 2 virus inactivation regimes– 2 UV options (with & without)
1536 x 106 calculations
Calculation sequenceViruses in raw sewage
Treatment efficiency
Virus concentrationat beach
Virus concentrationsin shellfish
Meal size
Bioaccumulation Duration of swim
Water ingestion/inhalation rate
Plume dispersion model(including inactivation)
Dose-responserelationships
Dose-responserelationships
UV disinfection, if present
Number of virusesingested
Number of virusesingested or inhaled
Proportion of population infected
Dose-response models• Constant susceptibility—simple exponential
(d = average dose, Prinf = infection prob)
• Variable susceptibility—“beta-Poisson”
• Calculations performed using “@RISK” (an Excel plug-in)
rdd e1)(Prinf
dd 11)(Prinf
Pro
b(in
f)
Volume ingested
Dose
Probability of infection
Infected?
Binomial
distribution
Duration
Fre
quen
cy
Occasion 1, Individual 1
Ingestion rate
Fre
quen
cy Microorg. concn
Fre
quen
cy
Pro
b(in
f)
Volume ingested
Dose
Probability of infection
Binomial
distribution
Duration
Fre
quen
cy
Occasion 1, Individual 2
Ingestion rate
Fre
quen
cy Microorg. concn
Fre
quen
cy
Infected?
Pro
b(in
f)
Volume ingested
Dose
Probability of infection
Binomial
distribution
Duration
Fre
quen
cy
Occasion 1, Individual 3
Ingestion rate
Fre
quen
cy Microorg. concn
Fre
quen
cy
Infected?
Pro
b(in
f)
Volume ingested
Dose
Probability of infection
Binomial
distribution
Duration
Fre
quen
cy
Occasion 1, Individual 1000
Ingestion rate
Fre
quen
cy Microorg. concn
Fre
quen
cy
Infected?
Sum the cases
Pro
b(in
f)
Volume ingested
Dose
Probability of infection
Binomial
distribution
Duration
Fre
quen
cy
Occasion 2, Individual 1
Ingestion rate
Fre
quen
cy Microorg. concn
Fre
quen
cy
Infected?
Pro
b(in
f)
Volume ingested
Dose
Probability of infection
Binomial
distribution
Duration
Fre
quen
cy
Occasion 2, Individual 2
Ingestion rate
Fre
quen
cy Microorg. concn
Fre
quen
cy
Infected?
Pro
b(in
f)
Volume ingested
Dose
Probability of infection
Binomial
distribution
Duration
Fre
quen
cy
Occasion 2, Individual 3
Ingestion rate
Fre
quen
cy
Microorg. concn
Fre
quen
cy
Infected?
Characterising the results
• Risk percentiles—percent of time the risk is below a stated value
• IIR—Individual Infection Risk (total number of calculated infections divided by total number of exposures)
ResultsSouth New Brighton
Integers are cases per 1000 exposures
RAW SHELLFISH CONSUMPTION: NORMAL NONCONSERVATIVE ROTAVIRUS
Summer Winter
2 km 3 km 2 km 3 km
no UV UV no UV UV no UV UV no UV UV
Min 0 0 0 0 0 0 0 0
50%ile 0 0 0 0 0 0 0 0
90%ile 0 0 0 0 0 0 0 0
95%ile 0 0 0 0 1 0 0 0
98%ile 0 0 0 0 4 1 2 1
99%ile 0 0 0 0 6 2 3 1
99.9%ile 1 1 0 0 15 6 7 3
Max 2 1 0 0 16 7 8 4
IIR(%) 0.0005 0.0002 0.0000 0.0000 0.0244 0.0052 0.0089 0.0032
IIR: Normal influent, South Brightonadenovirus, swim
2 km, no UV 2 km, UV 3 km, no UV 3 km, UV
Summer
0.0001 0.0000 0.0000 0.0000
Winter
0.0034 0.0002 0.0016 0.0005
Numbers are percentages. MfE/MoH (2003) guidelines: <0.3% = “Very good”.
IIR: Normal influent, South Brighton
rotavirus, shellfish2 km, no UV 2 km, UV 3 km, no UV 3 km, UV
Summer
0.0005 0.0002 0.0000 0.0000
Winter
0.0244 0.0052 0.0089 0.0032
Numbers are percentages.
IIR: Outbreak influent, South Brighton adenovirus, swim
2 km, no UV 2 km, UV 3 km, no UV 3 km, UV
Summer
0.0568 0.0179 0.0009 0.0003
Winter
2.1135 0.5552 1.0959 0.3016
Numbers are percentages. MfE/MoH (2003) guidelines: 1.9 - 3.9% = “Fair” - “Poor”.
IIR: Outbreak influent, South Brighton rotavirus, shellfish
2 km, no UV 2 km, UV 3 km, no UV 3 km, UV
Summer
0.3882 0.1034 0.0033 0.0005
Winter
4.9911 2.1668 2.3916 1.1779
Numbers are percentages.
IIR: Outbreak influent, South Brighton hepatitis A, shellfish
2 km, no UV 2 km, UV 3 km, no UV 3 km, UV
Summer
0.0343 0.0107 0.0000 0.0001
Winter
0.9441 0.2477 0.4633 0.1733
Numbers are percentages.
Statistical modelling can reveal important information gaps
• Bioaccumulation factors for NZ shellfish• Dose-response for norovirus (new study published)• Detailed exposure data (ingestion rates etc.)• Constancy of virulence?• Campylobacter in shellfish?• Better methods for uncertainty analysis• Better models for illness, cf. infection
Conclusions• Longer outfall no UV still has higher risk than shorter
outfall with UV• But risks low• What if UV doesn’t work 24/7 (technology
breakdown, power outage,…)• Decision: longer outfall, no UV
Semi-Quantitative approach
Use when hazards and exposures are less well-defined and more widespread
Paradigm is:
Risk score = Likelihood x Consequences
Use scores as a relative measure of risk.
Use panel of “experts”; may solicit list of hazards from affected community
“End-points” (exposures)
• Recreational contact• Drinking water consumption• Consumptions of aquatic organisms• Food? (more difficult)
The delivery chain
• Can be called “hazardous event”
• How does the hazard get from its origin to the point of exposure?
LikelihoodProbability of an exposure event (for at least one person) in a year (cf. any year) to a sufficient degree to cause harm. Scores:
0 Impossible 0
1 Extremely unlikely 1
2 Very unlikely 1 – 5%
4 Unlikely 6 – 40%
6 Even 41 – 60%
8 Likely 61 – 95%
10 Very likely >95%
Consequences
Scale# Severity* Duration*
1: <1% 1: Asymptomatic 1: Day
2: 1–5% 2: Discomfort 2: Week
3: 5–10% 3: Visit doctor 3: Month
4: 10–20% 4: Hospitalisation 4: Year
5: >20% 5: Death 5: Permanent# Percent of total community
* Refers to health effect
Typical resultsExposure Population Score Hazardous event
Recreational Water
Normal 250 Toxic algal bloom (marine) – inhalation
Recreational Water
Normal 250 Strong rips and current in bathing areas
Recreational Water
Normal 240 Urban stormwater discharge in streams and beaches
Recreational Water
Normal 240 Bird defecation into freshwater margins
Recreational Water
Normal 200 Toxic algal blooms (f/w) – inhalation
Recreational Water
Normal 200 Algae from overflow of oxidation ponds – inhalation
Recreational Water
Normal 200 Algae released from farm dams etc. – inhalation
Recreational Water
Susceptible 200 Bather shedding of infectious organisms
Recreational Water
Susceptible 200 Urban stormwater discharge in streams and beaches
Recreational Water
Susceptible 200 Bird defecation into coastal waters
Recreational Water
Normal 180 Dry weather sewage overflows in streams and beaches
Recreational Water
Normal 180 Cuts from naturally-occurring objects (oyster shells etc.)
Recreational Water
Normal 160 Bather shedding of infectious organisms
Recreational Water
Normal 160 Slipping on slimy surfaces
Recreational Water
Susceptible 150 Dry weather sewage overflows in streams and beaches
Drinking-water Mainland 125 Toxic algal blooms (f/w) – ingestion
Conclusions
• Use QRA for well-defined “local” problems• Use semi-quantitative methods for broader-scale
problems• Risk assessment identifies many knowledge gaps,
some need urgent attention• Most difficult gap often the “delivery chain”• Can update assessments with new data• Especially useful in ranking risks
EXAMPLEEXAMPLECompliance with Drinking Water StandardsCompliance with Drinking Water Standards
How to assess compliance with microbial limits?
• Can’t sample everything• Need high assurance that supply isn’t contaminated
in some assessment period; can’t be fully assured• MoH then said: “We want to be 95% confident that
the water is uncontaminated for 95% of the time. What should the compliance rule be?”
What kind of a question is this?What kind of a question is this?
• Bayesian– It asks about the probability of an hypothesis, given
data that we will collect– Frequentist (“classical” methods) ask about the
probability of data assuming an hypothesis to be true
• Precautionary (not “permissive”)– Benefit of doubt goes to the consumer, not to the
supplier
• One-sided– Hypothesis to be tested is breach, not compliance
Policy Implications
• Results in Table 8.2 now incorporated into 2005 Drinking-water Standards for New Zealand– http://www.moh.govt.nz/moh.nsf/
0/12F2D7FFADC900A4CC256FAF0007E8A0/$File/drinkingwaterstandardsnz-2005.pdf
EXAMPLEEXAMPLEEffect of microbial contamination on Effect of microbial contamination on
swimmers’ healthswimmers’ health
Epidemiological study at 7 NZ beaches
Main Findings
• Using generalized regression models– Evidence of respiratory illness effects related to
microbial contamination– Human- and animal-waste impacted beaches
not separable in terms of health effects– Both were separable from “control” beaches