You are on page 1of 30

STATISTICS WS 12/13 – DR.

PETZOLD

1. Explain with your own words

a) Explain with your own words “Principle of Parsimony” (=Occam´s razor) tell us? 6pts

The principle of Parsimony explain that normally the easies answer is better than the complicate
answer. It is apply in statistics to use the correct model, the enough amount the variables and test
necessary to explain in a correct way the situation.

b) If this principle has any problems, if applied to environmental systems

The problem is that normally environmental systems are complex with a large amount of variables and
the model can be over-simplificated.

c) and why it is nevertheless a good idea to follow this rule

Because normally we don’t need and over complicated model or a model that maximally fits the data.
We need the model with the best compromise between goodness of fit and model complexity, i.e. the
smallest model that fits the data reasonably well.
2. What Are?

a. “random Sampling” 2pt

Random sampling means that the individual objects for measurement are selected at random from the
population.

b. Stratified sampling 2pt

For stratified sampling it is required that the population is divided in sub-populations (strata). These are
separately sampled (at random) and the population characteristics are estimated by using weighted
mean values. (Therefore, it is essential, to have valid information about the size of the strata to derive
the weighting coefficients.)

c. Give example, advantage and disadvantage for each 2pt

Random sampling. Random selection of sampling sites by means of numbered grid cells; random
placement of experimental units in a climate chamber, random order of treatments in time.

Stratified sampling. Election forecast, volumetric mean for water body from measurements for different
layers, gut content of fish estimated from size classes.

*The advantage of stratified sampling is to get better estimates from smaller samples; it works only if
the weights coefficients are correct.

3. Given
a. Which is normal distributed 3 pts
Left, because is more close to the line
Right is right skewed (gamma resp. log normal)

b. Tell at least 2 other methods to check for normal distribution 3 pt

ShapiroWilk test test and histogram

Shapiro-Wilk normality test


data: my_data$len
W = 0.96743, p-value = 0.1091

From the output, the p-value > 0.05 implying that the distribution of the data are not significantly different

from normal distribution. In other words, we can assume the normality.

4. Mean=5, s=2, n=25

a. Calculate standard error (formula and result) 4pt

se =2/5=0.4

b. Calculate appr. Upper and lower limit of CI (95%) 2pt


Upper=5+/-1.96*0.4=5.784/4.216

5. Given: two samples x1=2,3,4,4,5 and x2=3,7,12,15,16 (Procedure of mean values evaluation of two
samples)

Boxplot for both

F-test p=0.009876 (test for equal variances using F test)

Welch test p=0.04523

a. Is using Welch test justified? Why? 4pt


As it can be observed the F-test that is used for identify the equality of variances has a p-values
less than 0.05 (0.0098), that means that the values doesnt have equal variances so it mas be
used Welch test. Welch test it’s used if the variances are not equal (heteroscedastic T- test),
otherwise should be used normal T test.

b. Are the mean values significantly different? 2pt


The p value for this Welch test is less than 0.05 so the means of both samples differ significantly.
7. Given:

a. What is a stationary time series? 2pt


A stationary time series occurs when the mean value and the variance and covariance do not vary with
respect to time.

b. Which of the graphs (A, B, C) is trend-; level-; difference stationary? 3pt

Level C, Trend A, Differecene B

c. Explain, why and esp. how trend- and difference stationary respectively can make

level stationary?2pt

Trend stationary can make a level stationary subtracting the trend and difference stationary can make
level stationary by differencing, so the variance heterogeneity disappear.

d. How can you check if a time series is difference stationary? 2pt

With KPSS test

STATISTICS WS 18/19 – DR. PETZOLD

2. Measured quantities can have different scales

a. What is the difference between a binary, an ordinal and a metric scale

Binary variables only have two states, 0/1, true or false, present or absent.

Ordinal variables can be ranked or ordered, but no defined distance in between.

Metric variables can be measured continuously, and can have intervals o ratios.

b. Give an example

Example of BINARY: Male or Female

Example of ORDINAL data is the trophic states of lake, oligotrophic, mesotrophic, eutrophic, etc.
Example of METRIC data could be the temperature.

4. Which advantages have statistical measures like median, quartiles, minimum and maximum in
comparison to arithmetic mean and standard deviation?

Because with the those statistical parameters are more robust and we obtain a lot of information from
the data that we have and we can check skewness of distribution (symmetry), if there is normal
distribution.

5. What is a multi-modal distribution?

a. Sketch a histogram of a multi-modal distribution

c. Give an example of a multi-modal distribution


Abundance of a fish with several age, classes, cohort, etc.)
d. Which statistical location parameters can be used for this?

Median and modal values (modes).

e. How does multi-modal benefit from using these parameters?


STATISTICS WS 2020 – DR. PETZOLD

1. Significance and effect size:


A) What is the difference between significance, effect size and relative effect size?
Effect size is difference between two means, or correlation, something that you can
measure that something is happening. A measure of how much something changes.
Significance measures whether something can happened just by chance at random.
It can be related if the size of sample is small, big effect that can be occur by random. (if
here is small population always can identify something and a pattern can occur at random,
in big data we can get significant effect but the effect size is so small that does not matter
at all. In modern statistics, we try to get rid of the pure value of the significant we want
also now what is the sample size and how big is the effect.
B) Give a definition of significance or explain it briefly with your own words
Means probability that something that we see can occur by chance.

C) What does “not significant” exactly mean?


Means either there is no effect or our sample size is too small
D) Are there alternatives to p-value based testing?
Model Selection or Aic-Bic base model selection.
2. Measured quantitives can have different scales:
A) What is the difference between a nominal and an ordinal scale?
Nominal you can put a name
Ordinal is that you can arrange it in order
B) Give an example for both
Nominal:
C) How can metric data be transformed into an ordinal scale?
By ranking
D) How can metric data be transformed into an binary scale?
By assigning a threshold
E) Has a transformation any disadvantages?
We lose information, and statistical test may lose power.
F) Is there any advantages?
We can use test for the low quality test, chi square, when metric data is not that precise.

3. Explain difference between random errors and systematic errors


a) Give a short definition or explanation for both.
Random errors is the one that we don’t know where it comes from and happened at
random
Systematics error is the one for example wrong measure in the measure device
b) How can random error be minimized?
Increase sample size improve precision of measure (calibration)
c) How can systematic errors be handled?
improve precision of measure (calibration)

4. Which test or method can be used for comparing:


a) The variance of two sample?
F-test
b) The location parameter (mean value) of two sample?
T-test. (the location of the hole distribution without calculating any parameter, wilkox test,
non-parametric test)
c) Frequencies of count data(binary data), e.g. effectivity of a drug in a 2 by 2 contengency
table?
Chi square, Fisher?
d) Which assumptions are common and/or different for test (a) and test (b) ?
Assumptions for F and T test Independence, variance homogeneity, (but not for f test),
normal distribution.
F-test (the null hypothesis is the homogeneity of variance)
5. Let’s assume a normally distributed sample with mean value X=1, standard deviation s=3, and
sample size n=36.
a) Calculate de standar error of the mean.(formula)
Std error= s/Square root of n = 0.5
b) Estimate lower and upper 95% confidence limits of the mean.
MEan+-1.96stderror= 1.98, 0.02

6. Sketch density plots of (a) a normal distribution (b) a lognormal distribution and (c) a uniform
distribution. Annotate it like follows:
Note: There are other distribution like Poisson and binomial.
a) Normal: variable x: probability density f, mean, standard deviation.

b) Lgnormal: variable x, probability density f, geometric mean G.

c) Uniform: mean, minimum, maximum.

d) How are the normal and the lognormal distribution related to each other?
The lognormal distribution is formed by taking the logarithm of the values of the data in order
to get a normal distribution.
e) Which distribution would you use as a first guess for discharge data of a stream similar to the
Elbe River?
Log normal distribution, due to the data normally is not normal distributed or uniform and
normally shows a right skewness (distribution) due to the different values.

f) Does the result of the Shapiro-Wilks W test imply that a normal distribution can be assumed?
(2 pts.)

Shapiro-Wilk normality test


data: x

W = 0.97175, p-value = 0.07342

g) What does the Box-Cox plot for the same data set tell us? Would it be wise to transform the
data? Give an explanation and if yes, which transformation? (2 pts.)

7. Test for distribution

a) Which of the two data sets looks like a normal distribution?


Left
b) Which other methods can be used to check for normality of a distribution? At least 2 method
Shapiro Wilkx test, graphical histogram box plot.

8. Assume we want to analyze the dependency between chlorophyll and phosphorus


concentrations in lakes by means of linear regression analysis:
A) Decide whether the left or the right figures is correct? Why?
Right (why is better, the left one has a fan shape pattern the right has variance
homogeneity and more symmetric due to log transformation).
B) Which percentage of the Chlorophyl variance is explained by the linear model?
R2= 74.8%
C) What do the inner and outer interval tell us?
Inner interval is the confidence interval of the regression line,.
The outter interval is the prediction interval
D) How can the coefficient of determination be calculated?
R2=Total variance – residual variance /total variance
9. Given are 6 brands of clementine’s oranges, bought in different shops. Let us assume we prefer
the biggest fruits, because we think that big fruits have more juice. The samples of fruits were
compared by an ANOVA and an additional Tukey post-hoc test.

a) Which brand contained the biggest clementine’s? Why?


N the big box because of the median
The smaller fruits, A2 for the value that is really low, and the smalles median fruits V for the
median value.
b) Is the brand with the smallest median significantly different from the others? Why?
Almost all the values are before the value of cero in figure 2, except for v-A2 hat is difficult to
say because the confidence interval hits the line of cero, but in general, it can be assumed that
the mandarin of V are significantly different than the others.
c) Give an example for two brands where differences are not significant.
d) Why did we apply an ANOVA and not a series of T-Tests?
To avoid false positives, if we do more test we can have the alfa error inflation.
e) Why was it necessary to apply Tukey’s post hoc test(right figures)?
Because if we have more than one factor level (brand) we don’t know from anova which one
differes so that is what bonferonni test is for.
f) Did the experimental design fulfill al ANOVA assumptions? What could be done better?
It is not 100% correct to take complete bags of different shops if we would really check specific
brand we should go to different shops and sample it at random.

10. Given is the following x-y- data set and an analysis with R.

Pearson test p=0.06916 and cor= 0.718

Spearman: p=0.0123 and cor= 0.8928

a. What do the result tells us? 4pt


Both test Pearson and spearman show correlation, but the p value for Pearson test is greater
than 0.05, that means that it doesn’t show significance, it means that it might be correlation
due to randomness.
b. Which of the two test is more appropriate? 2pt
More appropriate is spearmen because the correlation is higher, the p values is less than 0.05
that means is significant.

a) Which type of the function can be used to fit a curve to the data?
A nonlinear regression (exponential)
b) With which statistical and practical approach would you do this?
11. The following time series of annual air temperature (Tair) data was taken from the German
weather service station near Dresden. The scientific question of the analysis was to test for a
significant temperature trend as a consequence of the climate change.

a) Reformulate the scientific question as a pair of hypotheses: a null hypothesis (Ho) and an
alternative hypotheses (Ha) for Man kendall
H0: there is no trend
Ha: There is a monotonous trend (increasing or decreasing) it does not test a linear trend.
b) Explain which of the tests below answers our scientific questions best, and what can be
concluded for the temperature trend.
Mann Kendall test, the increment in temperature is 0.07972
c) How many degrees did the air temperature increase or decrease per year?
0.07972
d) Which statistical hypothesis is tested by the Mann-Kendal test? What are its advantages and
disadvantages, compared to the linear regression model (lm) below?

H0: there is no trend


Ha: There is a monotonous trend (increasing or decresing) it does not test a linear trend.

e) What is the effect size, i.e. how many degrees did the air temperature increase or decrease per
year?
Slope of the regression: 0.07972

f) What is the 95% confidence interval for this increase or decrease


Confidence interval for the trend=0.07972 +/- 2*0.01603(standard error), 0.11178,0.04766

g) Why is it a good idea to click for autocorrelation of the residuals?


If the residuals shows still autocorrelation and significant values (outside the lines) then the
trend analysis is not valid.
h) Which other test(s) could be used to check for stationarity?
KPSS test.
Note: autocorrelation is more than just testing for stationarity; in our answer said was test for
dependency for residuals and test for stationarity. It’s a graphical test (ACF) that you can find more
about the data. Even for describe modeling because it can be identify parameters.

a) Explain the kpss.test(Tair, null=Trend") (2 pt.)

The KPSS test (Kwiatkowski-Phillips-Schmidt-Shin test) tests directly for stationarity or trend
stationarity

b) Explain the MannKendall(Tair) (2pts)

Common trend tests are suitable only for trend-stationary time series, but not for difference-stationary
time series, because in these the residuals are autocorrelated. This also holds true for the Mann-
Kendall test which is popular in environmental sciences. In its standard formulation it is applicable only
for trend-stationary time series.
> MannKendall(Tair)
tau = 0.449, 2-sided pvalue =1.5855e-05
> m <- lm(Tair ~ time(Tair))
> summary(m)
Call:
lm(formula = Tair ~ time(Tair))
Residuals:
Min 1Q Median 3Q Max
-3.2733 -0.9369 -0.0816 0.6197 2.9386
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -150.03413 31.88781 -4.705 2.64e-05 ***
time(Tair) 0.07972 (change o T) 0.01603(st. error) 4.973 1.11e-05 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 1.397 on 43 degrees of freedom
Multiple R-squared: 0.3651, Adjusted R-squared: 0.3504
F-statistic: 24.73 on 1 and 43 DF, p-value: 1.106e-05
> plot(Tair); abline(m, col="red")
> acf(residuals(m))

12. The following plot shows the time series of the discharge from River Nile. The purpose was to
figure out if there were structural breaks.
a) Reformulate the scientific question as a pair hypotheses: a null hypothesis (Ho) and an
alternative hypothesis (Ha).
Ho: There is no change of discharge over time
Ha: There is a change of the mean discharge (getting higher or lower)
b) Which test will give you information about the existence of break points in the time series?
OLS CumSUM test (it works: we take average over the hole time and cumulate the
differences (subtract the average of al individual data) and if they are above the mean
value we have an increase of the accumulated sum and if they are below the mean value
we have a decreaseing. Graph ols.
c) Based on the given information below, which model and how many break points represent
your data best?

Ans1. There is one breakpoint measured by BIC in the year 1898 m=1

Ans 2. If we consider the AIC there are 2 break points 1898 and 1953 m=2

Perfect Answer. Bic says 1 break point and Aic says 2 break point. We don’t knot for sure
which of this models are better because the values of fm1 and fm2 for AIC and BIC is less
than the meaure unit 2, because in AIC each value is penalizy with a value of 2. To have a
better it should be improve more than 2 units.

d) When did the breakpoint(s) occur?

1998 and 1953

e) What are possible hydrological reason for the structural breaks in the river discharge time
series ?
Extrem events, drough or flood
Perfect answer for c. The measurement unit of AIC is 2, the difference between fm1 and fm2
is less than 2

Test Trial

Distribution
Log normal distribution

Test for distribution

Shapiro, kolmogorov
Accuracy of mean value

A) Standar error
B) s/raiz n
Scales

a. Ordinal scale: very cold, cold warm hot

Ratio scale: 4 K 59 K 120 because there is Absolut 0

Interval: temperature

Nominal: red, yellow

c. Rank transformation
Linea Regression

a) Right.
b. the error variance must be homogeneous

c. R2= 74.8% by the linear model (coeff of determination for non linear regr) Multiple R in (Rstudio)

R= 86.5% correlation value between the variables, only for lineal regression (square root of multiple
R). IT does not apply for non linear regression.

Inner interval confidence level

Outer interval prediction


e) 2=1-se2/sy2

Fish Growth

a) T test

b) 1.Independence, 2. Variance homogeneity, 3. Normal distribution.

Break point Nile discharge


A) Cumulative Sums of ordinary least squares

b) BIC indicates 1 break point

AIC indicates 2 break points

c) 1898 and 1953


Air temperature time series

Trend

a) Ho there is no MONOTONIC trend


b) Ha THRE IS A MONOTONIC TREND (UPWARD OR DOWNWARD)
0.07972

=SLOPE+/-2*STANDAR ERROR=0.07972+/-2*0.01603=0.04766,0.11178

D) KWIATKOWSKI-PHILIPS-SCHMIDT-Shin test KPSS

R nonlinear regression
Parameters:

Estimate Std. Error t value Pr(>|t|)

Maximum BOD turnover rate Vm 53.135 2.224 23.890 1.88e-09 ***

Half Saturation Constant K 14.363 1.750 8.209 1.80e-05 ***

Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 1.4 on 9 degrees of freedom

Number of iterations to convergence: 4

Achieved convergence tolerance: 6.028e-06

> (Rsquared <-1 -var(residuals(aFit))/var(V))

Coefficient of determination R2 [1] 0.989047


7. Given are the following two samples x1 = f2; 3; 3:5; 4:2; 5g and x2 = f4; 7; 5; 6; 5:5g.

a) Is a Welch test (option var.equal=FALSE) allowed in this case? Why? (2 pts.)

b) Are the mean values of the two samples significantly diferent? Why? (2 pts.)

8. The following data from an experiment show the dependency of carbon uptake (V ) by
microorganisms on substrate concentration (S). The plot shows a typical saturation at high substrate
concentrations.

a) What is the name of the model defined by function f in the R code (1 pt)?

b) Draw a sketch of this model and annotate variables (S, V) and how to get the parameters (Vm, K). (2
pts)

c) For nonlinear regression, start parameters have to be given. Please give rough estimates for good
start parameters for Vm = ::: and K = :::. (2 pts)

d) How can the regression line be fit in a spreadsheet program like LibreOfice or Excel?
Give a short explanation and sketch a spreadsheet table how this can be done. (3pts)

e) Which formula can be used to calculate the coefficient of determination for a nonlinear model? (2
additional points)

You might also like