Part 1: Statistics and Econometrics. MK68-2024/25
Justus Liebig University Giessen
Institute of Agricultural Policy and Market Research
The slides below show you what you can expect on an exam based on the material of the past weeks.
Please note that:
Answer two questions from the list below:
What measures of central tendency are most commonly applied in social sciences?
What are extreme observations or outliers?
What effect do outliers/extreme observations have on the mean/median, standard deviation/IQR?
Is the median one of the quantiles or is it a measure of central tendency?
What is the Hypothesis Testing?
An RCT experiment was designed to understand the effect of technology (“Minimal” vs “Optimal”) on rice yields. It included:
Randomly selecting 60 farms and offering them two equivalent rice varieties to plant.
Training half of them in applying Optimal technology (treatment), and
Keeping half of the farmers with the same minimal technology (control).
During the production season, researchers recorded for each farm:
Technology, rice variety, rice yield, and fertilizer use.
The research objective was to measure the effect of technology on rice yield.
Answer the questions on the following slides based on this example.
| Unique | Missing Pct. | Mean | SD | Min | Median | Max | |
|---|---|---|---|---|---|---|---|
| yield | 60 | 0 | 5.4 | 1.1 | 3.1 | 5.4 | 7.9 |
| nitrogen | 52 | 0 | 77.3 | 49.6 | 0.0 | 79.0 | 148.6 |
| potassium | 60 | 0 | 33.1 | 15.1 | 1.7 | 34.3 | 61.4 |
| phosphorus | 60 | 0 | 37.6 | 21.6 | 0.8 | 38.8 | 74.7 |
| N | % | ||
|---|---|---|---|
| tech | Minimum (control) | 30 | 50.0 |
| Optimum (treatment) | 30 | 50.0 | |
| variety | V1 | 30 | 50.0 |
| V2 | 30 | 50.0 |

What differences do you observe between technologies in terms of the fertilizers used?
What can we conclude about the quality of random assignment based on this plot?
Minimum (control) (N=30)
|
Optimum (treatment) (N=30)
|
|||
|---|---|---|---|---|
| Mean | Std. Dev. | Mean | Std. Dev. | |
| nitrogen | 77.7 | 50.4 | 76.9 | 49.7 |
| potassium | 28.0 | 14.4 | 38.2 | 14.2 |
| phosphorus | 31.7 | 17.9 | 43.4 | 23.7 |
Significance levels are: ‘+’=.1, ‘*’=.05, ‘**’=.01, ‘***’=0.001
Perform hypothesis testing about the difference in mean fertilizer application between the two technologies.
What can we conclude about the quality of random assignment based on this table?

Our key objective is to quantify the effect of technology on yields.
What differences do you observe between technologies in terms of rice yields?
Can we conclude about the causal effect of technologies based on this plot?
Minimum (control) (N=30)
|
Optimum (treatment) (N=30)
|
|||
|---|---|---|---|---|
| Mean | Std. Dev. | Mean | Std. Dev. | |
| yield | 5.2 | 1.1 | 5.6 | 1.1 |
Significance levels are: ‘+’=.1, ‘*’=.05, ‘**’=.01, ‘***’=0.001
Why do we need this HT?
Formulate H0 and H1.
Conclude about the effect of technology on yields.
What statistics did you use?
What is the highest level of significance for your results?
Does the optimal technology have any causal effect on yields?
How large is this effect?
Does the RCT performed here ensures the ceteris paribus?
What else can influence the effect of technology on yield?
How can we control for it?

What does this plot show?
Considering previous results, can we conclude about the quality of random assignment now?
Is there a causal effect of variety on yields, which effect is this?
V1 (N=30)
|
V2 (N=30)
|
|||
|---|---|---|---|---|
| Mean | Std. Dev. | Mean | Std. Dev. | |
| yield | 4.7 | 0.8 | 6.1 | 0.9 |
Significance levels are: ‘+’=.1, ‘*’=.05, ‘**’=.01, ‘***’=0.001
Formulate H0 and H1.
Conclude about the yield difference between varieties.
Based on our sample, can we conclude that variety has a causal effect on yields?
Does our sample ensure the ceteris paribus? How does our sample ensure it?
Does the random assignment of technology ensure the ceteris paribus here?
What are the most relevant other factors that may influence the ceteris paribus in our sample?
Given that what can we conclude about the causal effect of technology on yields?
After today’s lecture you should be able to answer the following:
Can we “control” the effects of the other factors?
What econometric method can we use to re-establish the ceteris paribus?
How (can we at all) measure the effects of other factors such as fertilizer application on the yields?


For your reference and information.
The keywords/concepts below are meant to improve the clarity of communication when performing the hypothesis testing. Please use it! They will help make your results understandable for the reader.
Test name and what it is about (t-test about means comparison between two groups).
\(H_0\) and \(H_1\).
Estimated parameters (means, coefficients, differences, standard error), \(df\) / n observations.
Level of significance of the HT. (\(\alpha = 0.05\) or 5% level of significance)
Rejection rule: \(\text{p-value} < \alpha\) or \(|t| < c_{df, \, 1 - \alpha /2}\) (statistics vs critical value) or \(1 - \alpha\) confidence intervals (95% CI).
Conclusions: reject/fail to reject;
Implications
what do these conclusions imply for your analysis?
(for example. … reject \(H_0\). Thus, the mean “outcome” in the treatment group XX is higher than that in the control group, suggesting about the great success of our intervention …).
two-variables linear or bi-variate linear regression model.
Explains how \(y\) the Dependent variable varies with changes in \(x\) the independent variable.
Always unknown
\[y = {\beta}_{0} + {\beta}_{1}x + u\]
What we learn from the sample of size \(n\), where \(i \in {1, 2, \dots, n}\)
\[y_i = \hat{\beta}_{0} + \hat{\beta}_{1} x_i + \hat{u_i}\]
We simulate a population of \(2\times 10^{6}\) agricultural fields. Each field has only two characteristics:
Each field could be different in quality of soil, landscape, accessibility but we assume that the other things are equal.

See (Ritter et al. 2020) for a discussion on the size-price relationship.










plot_large is a dummy variable also called an “indicator variable”
# A tibble: 600 × 4
area value plot_size plot_large
<dbl> <dbl> <fct> <dbl>
1 3.79 3180. Large plot 1
2 3.01 2920. Large plot 1
3 1.10 1252. Small plot 0
4 1.06 1669. Small plot 0
5 2.23 2656. Small plot 0
6 4.11 3276. Large plot 1
7 3.65 4393. Large plot 1
8 0.705 928. Small plot 0
9 4.30 4179. Large plot 1
10 1.09 1720. Small plot 0
11 3.77 3869. Large plot 1
12 1.85 2655. Small plot 0
# ℹ 588 more rows





t.test(value ~ plot_size, plot_pop_dta2)
# Welch Two Sample t-test
# data: value by plot_size
# t = -29.887, df = 594.75, p-value < 2.2e-16
# alternative hypothesis: true difference in means
# between group Small plot and group Large plot
# is not equal to 0
# 95 percent confidence interval:
# -2094.443 -1836.148
# sample estimates:
# mean in group Small plot
# 1699.595
# mean in group Large plot
# 3664.890 Regression parameters / coefficient (\(\hat{\beta}_0\) and \(\hat{\beta}_1\)) are estimated using the Ordinary Least Squares (OLS) method. These are:
The intercept: (\(\hat{\beta}_0\))
The slope: (\(\hat{\beta}_1\))

In the example of land price, where \(\hat{\beta_0} = 656.15\) and \(\hat{\beta_1} = 810.95\):
Intercept:
Slope:




1 Proposes \(\hat{\beta_0}\) and \(\hat{\beta_1}\) so that actual values are: \(y_i = \hat{\beta}_0 + \hat{\beta}_1 \cdot x_i + \hat{u}_i\)
2 Computes fitted values (\(\hat{y}_i = \hat{\beta}_0 + \hat{\beta}_1 \cdot x_i\)) and residuals (\(\hat{u}_i = y_i - \hat{y}_i\)).
3 Computes squared residuals and the sum of it \(\sum \hat{u}^2\)
4 Repeats 1-3 with new estimates of \(\hat{\beta_0}\) and \(\hat{\beta_1}\);
5 Compare new sum of squared residuals \(\sum \hat{u}\) to the previous one.
6 Repeats 4-5 to minimize sum of squared residuals until it no longer reduces.
7 Estimates of \(\hat{\beta_0} = 656.15\) and \(\hat{\beta_1} = 810.95\) are values, where sum of squared residuals are minimal (\(\sum \hat{u}^2 = 530,480,825,704.7\)).
we never have the entire population
instead, we can only derive (random) samples
Therefore, absolute estimates of the population’s parameters (slope and intercept) are insufficient.
We need to perform …
Hypothesis testing!
To illustrate this, let us follow-up on the simulated population and derive 6 random samples of 9 observations in each sample.
population regression line is in red and estimated regression line is in blue

fit0 <- lm(value ~ area, land_pop)
summary(fit0)
#> Coefficients:
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) 656.4388 0.7503 874.9 <2e-16 ***
#> area 810.8136 0.2574 3150.0 <2e-16 ***
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
#> Residual standard error: 515 on 1999998 degrees of freedom
#> Multiple R-squared: 0.8322, Adjusted R-squared: 0.8322
#> F-statistic: 9.922e+06 on 1 and 1999998 DF, p-value: < 2.2e-16\(H_0:\beta = 0\)
\(H_1:\beta \neq 0\)
\(t = {\hat{\beta}}/{se_{\hat\beta}}\)
\(t^* = c_{df, \, 1 - \alpha /2}\)
\(df = n - k\) with \(n\) number of observations and \(k\) number of regressors \(k = 2\) (one for the intercept and one the slope).
Reject \(H_0\), when
\(|t| > t^*\), or
\(\text{p-value} < 0.05\), or
\({\hat{\beta}}/{se_{\hat\beta}} > 2\) (rule of thumb).
Fail to reject \(H_0\) otherwise.
fit0 <- lm(value ~ area, land_pop)
summary(fit0)
#> Coefficients:
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) 656.4388 0.7503 874.9 <2e-16 ***
#> area 810.8136 0.2574 3150.0 <2e-16 ***
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
#> Residual standard error: 515 on 1999998 degrees of freedom
#> Multiple R-squared: 0.8322, Adjusted R-squared: 0.8322
#> F-statistic: 9.922e+06 on 1 and 1999998 DF, p-value: < 2.2e-16Explanatory power of the model:
R-squared: measures the fraction of variance in the dependent variable that is explained by the independent variable.
Adjusted R-squared: accounts for the number of independent variables, usually decreasing compared to the R-squared, when we add irrelevant independent variables.
Regression coefficients: an intercept and a slope
Interpretation of the regression coefficients
Statistical inference about the regression coefficients
Fitted (predicted) values
Error terms
Adjusted R squared.
Review examples below at home:
Comment on (1) what relationship is measured by this regression? (2) what are the interpretations of the coefficients?
\(\beta_0\) indicates the expected level of \(yield\) (in the units of \(yield\) ) given zero level of \(fertilizer\) application given that other things (rainfall, land quality, etc.)
\(\beta_1\) indicates the expected change in \(yield\) (in the units of \(yield\) ) given one unit change (usually increase, but not always) in \(fertilizer\) application given that other factors remain fixed (rainfall, land quality, etc.)
Source: (Wooldridge 2020)
Interpret the slope:
The goal of this example is to show that simple linear regression could be used for exposing trends and showing how those trends change significantly after the introduction of a new policy.
In 1971, James Lovelock had discovered a new compound in the earth’s atmosphere, trichlorofluoromethane, a chlorofluorocarbon (CFC). See: (Lovelock 1971)
In 1974 Sherwood Rowland and Mario Molina (Molina and Rowland 1974) discovered the mechanism how CFC gases damage the ozone layer by photolysis. (In 1995 together with Paul Crutzen they were awarded a 1995 Nobel Prize in Chemistry)
In 1987, The Montreal Protocol was accepted by 191 countries aiming to reduce the levels of ozone depleting substances (ODSs) in the atmosphere.
It took humanity only 14 years to bridge scientific finding with the global policy.
Data source: gml.noaa.gov
Let us establish a causal effect between the Montreal Protocol and the global CFC-11 emissions/concentration.
we can:
split data into Before and After The Montreal Protocol;
fit two separate simple regressions: \(\text{CFC-11} = \hat \beta_0 + \hat \beta_1 \cdot \text{year} + \hat u\)
There are no other factors which could have affected the CFC-11 emissions but the Montreal Protocol.
Technology change, although endogenous, has forced to reduce CFC-11 emissions due to the Protocol.
Watch: Selection Bias: https://youtu.be/6YrIDhaUQOE
Readings for your reference:
Regression equation:
\[y = \hat {\beta}_{0} + \hat {\beta}_{1}x_1 + \hat {\beta}_{2}x_2 + \hat {\beta}_{3}x_3 + \cdots + \hat {\beta}_{k}x_k + \hat u\]
\(y\) the dependent variable;
\(x_1, x_2, x_3, \cdots x_k\) the independent variables from the set \(k\);
\(\hat {\beta}_{0}\) - intercept (constant term);
\(\hat {\beta}_{1}\), \(\hat {\beta}_{2}\), \(\hat {\beta}_{k}\) - coefficients / parameters associated with \(x_1\), \(x_2\), … \(x_k\);
After we estimate the regression equation and obtain our estimates \(\hat {\beta}_{0}, \hat {\beta}_{1}, \hat {\beta}_{2}, \cdots, \hat {\beta}_{k}\) we can calculate:
\(\hat y\) fitted of predicted value or the dependent variable and \(\hat u\) error terms
\[\hat y = \hat {\beta}_{0} + \hat {\beta}_{1}x_1 + \hat {\beta}_{2}x_2 + \hat {\beta}_{3}x_3 + \cdots + \hat {\beta}_{k}x_k\]
\[\hat u = y - \hat y\]
To incorporate more explanatory factors into a model;
Explicitly hold fixed (some) other factors;
Allow for more flexible functional forms;
To correct the selection bias problem in the absence of (poor quality of) the RCT;
To establish the ceteris paribus in observational data;

We assume that all unobserved factors do not change if the explanatory variables are changed.
Model assumes a constant elasticity relationship between CEO salary and the sales of his or her firm.
Model assumes a quadratic relationship between CEO salary and his or her tenure with the firm.
\[y = \hat {\beta}_{0} + \hat {\beta}_{1}x_1 + \hat {\beta}_{2}x_2 + \hat {\beta}_{3}x_3 + \cdots + \hat {\beta}_{k}x_k + \hat u\]
MLR uses the Ordinary Least Squares (OLS) method to estimate regression parameters \(\beta\).
As any estimate of \(\beta\) is based on a sample, we need to relay on the inference to test a hypothesis about the true coefficients in the population.
We use data on motor fuel consumption and related variables, for the year 2001. Each observation represents a state in the United States. (based on the data from Weisberg (2005)). Variables are:
How do fuel taxes affect gasoline consumption?:
Write a regression equation:
\[Fuel = \hat\beta_0 + \hat\beta_1 Tax + \hat\beta_2 Dlic + \hat\beta_3 Income + \hat\beta_4 Miles + \hat{u}\]
Discuss, what effects can we expect from change in each variable \(x\) on \(y\)?
Hypotheses:
| rowname | mean | sd | median | skew | kurtosis | se |
|---|---|---|---|---|---|---|
| Tax | 20.15 | 4.54 | 20.00 | -0.67 | 0.55 | 0.64 |
| Dlic | 903.68 | 72.86 | 909.07 | -0.30 | 0.31 | 10.20 |
| Income | 28.40 | 4.45 | 27.87 | 0.62 | -0.04 | 0.62 |
| logMiles | 10.91 | 1.03 | 11.28 | -1.43 | 1.92 | 0.14 |
| Fuel | 613.13 | 88.96 | 626.02 | -0.88 | 2.09 | 12.46 |
Variable of interest: Tax.
Outcome variable: Fule.
What kind of relationship exists between Tax and Fuel?



Multiple linear regression helps to reveal the true causal effect of Tax by
controlling all other things
making them equal when the tax changes by one unit
fit_fule_1 <- lm(Fuel ~ Tax + Dlic + Income + logMiles, fule_cons)
summary(fit_fule_1)
# Coefficients:
# Estimate Std. Error t value Pr(>|t|)
# (Intercept) 154.1928 194.9062 0.791 0.432938
# Tax -4.2280 2.0301 -2.083 0.042873 *
# Dlic 0.4719 0.1285 3.672 0.000626 ***
# Income -6.1353 2.1936 -2.797 0.007508 **
# logMiles 26.7552 9.3374 2.865 0.006259 ** Here we need to:
perform the HT about estimated coefficients;
interpretation of their economic meaning;
compare estimates with ex-ante expectations.
fit_fule_1 <- lm(Fuel ~ Tax + Dlic + Income + logMiles, fule_cons)
summary(fit_fule_1)
# Coefficients:
# Estimate Std. Error t value Pr(>|t|)
# (Intercept) 154.1928 194.9062 0.791 0.432938
# Tax -4.2280 2.0301 -2.083 0.042873 *
# Dlic 0.4719 0.1285 3.672 0.000626 ***
# Income -6.1353 2.1936 -2.797 0.007508 **
# logMiles 26.7552 9.3374 2.865 0.006259 **Positive but insignificant at the 5% level. (p-value = 0.432).
Contradicts our ex-ante hypothesis about some basic level of fuel consumption;
Suggests that the absence of a road network could drive fuel consumption to zero.
fit_fule_1 <- lm(Fuel ~ Tax + Dlic + Income + logMiles, fule_cons)
summary(fit_fule_1)
# Coefficients:
# Estimate Std. Error t value Pr(>|t|)
# (Intercept) 154.1928 194.9062 0.791 0.432938
# Tax -4.2280 2.0301 -2.083 0.042873 *
# Dlic 0.4719 0.1285 3.672 0.000626 ***
# Income -6.1353 2.1936 -2.797 0.007508 **
# logMiles 26.7552 9.3374 2.865 0.006259 **Negative and significant at the 5% level (p-value = 0.043).
One cent increase in taxes per liter causes flue consumption to reduce by -4.2 liter per capita, given that all other factors remain fixed.
This is in line with our ex-ante hypothesis.
Note: \(Income\) in 1000 USD Per capita personal income (the year 2000)
fit_fule_1 <- lm(Fuel ~ Tax + Dlic + Income + logMiles, fule_cons)
summary(fit_fule_1)
# Coefficients:
# Estimate Std. Error t value Pr(>|t|)
# (Intercept) 154.1928 194.9062 0.791 0.432938
# Tax -4.2280 2.0301 -2.083 0.042873 *
# Dlic 0.4719 0.1285 3.672 0.000626 ***
# Income -6.1353 2.1936 -2.797 0.007508 **
# logMiles 26.7552 9.3374 2.865 0.006259 ** Negative and significant at the 5% level (p-value = 0.043).
An increase in income by 1000 USD per person causes fuel consumption to reduce by -6.1 liter per capita, ceteris paribus.
This contradicts our ex-ante hypothesis. Why?
Note: \(logMiles\) is the logarithm of miles. Interpretation differs because this is a level-log transformation
fit_fule_1 <- lm(Fuel ~ Tax + Dlic + Income + logMiles, fule_cons)
summary(fit_fule_1)
# Coefficients:
# Estimate Std. Error t value Pr(>|t|)
# (Intercept) 154.1928 194.9062 0.791 0.432938
# Tax -4.2280 2.0301 -2.083 0.042873 *
# Dlic 0.4719 0.1285 3.672 0.000626 ***
# Income -6.1353 2.1936 -2.797 0.007508 **
# logMiles 26.7552 9.3374 2.865 0.006259 ** Positive and significant at the 5% level (p-value = 0.043).
An increase in road network by 1% causes fuel consumption to increase by 26.7/100 (0.26) liter per capita, given ceteris paribus.









exist to ensure that linear regression estimates are unbiased and efficient!
OLS is unbiased. Assumptions 1 to 4 are satisfied:
OLS is unbiased and efficient. Best Linear Unbiased Estimator (BLUE). Assumptions 1 to 5 are satisfied
OLS is a Classical linear model (CLM). Assumptions 1 to 6 are satisfied
the expected value of the dependent variable is a straight-line function of the independent variable
If linearity is violated:






To detect non-linearity, we inspect data visually with:
Scatter plots of dependent variable \(y\) plotted versus independent variables (\(x\)).
Scatter plot of residuals versus predicted/fitted values
We’ve estimated a regression mode \(Y = \beta_0 + \beta_1 x\) on 50 observations. Results:


To check nonlinearity, we need to plot fitted values on \(x\) axis and residuals on \(y\) axis.
If we can draw a horizontal line through the dots, we have linearity, if not, we have non-linearity.


Here we use the same population but increase our sample size to 150 observations. (Small sample size may cause seeming nonliearities).








Functional form: multiple regression and transformation.
(non) linear transformation to the dependent and/or independent variables;
find a different independent variable;
propose a different functional form;
We had nonlinearity with a simple regression: \(y = \beta_0 + \beta_1x\).

Let us estimate a multiple regression: \(y = \beta_0 + \beta_1 x + \beta_2 x^2\).


After the linear transformation of \(x\) and multiple regression \(y = \beta_0 + \beta_1x\), our regression line is a curve (non linear).

Residuals vs. Fitted plot also changes:


| Model | Dep. Var. | Indep. Var. | Interpretation of \(\beta_1\) | Interpretation |
|---|---|---|---|---|
| Level-level | \(y\) | \(x\) | \(\Delta y = \beta_1 \Delta x\) | 1 unit change in \(x\) causes \(\beta_1\) units change in \(y\) |
| Level-log | \(y\) | \(log(x)\) | \(\Delta y = (\beta_1/100)\% \Delta x\) | 1 % change in \(x\) causes \(\beta_1/100\) units change in \(y\) |
| Log-level | \(log(y)\) | \(x\) | \(\% \Delta y = (100\beta_1) \Delta x\) | 1 unit change in \(x\) causes \(100 \beta_1\) % change in \(y\) |
| Log-log | \(log(y)\) | \(log(x)\) | \(\% \Delta y = \beta_1 \% \Delta x\) | 1 % change in \(x\) causes \(\beta_1\) % change in \(y\) (elasticity) |
Power transformation (\(x^2\), \(\sqrt x\)), Box-Cox transformations;
Variables normalization to the standard normal distribution;
Tailor expansion (Cobb-Douglas, Trans-log)
Simple linear regression:
Ceteris Paribus
Multiple linear regression
Assumptions of the regression analysis.
Linearity assumption
The term “regression” was coined by Sir Francis Galton, Charles Darwin’s half-cousin, in 1886
he was gripped by Darwin’s masterpiece, The Origin of Species.
he used “Regression” to prove his points of Eugenics…
Statistics has some dark history…
Paper: Francis Galton, “Regression towards Mediocrity in Hereditary Stature,” Journal of the Anthropological Institute of Great Britain and Ireland, vol. 15, 1886, pages 246–263
Galton discovered that the average heights of fathers and sons are linked by a regression equation.
the average height of sons is a weighted average of their fathers’ height and the average height in the population from which the fathers and sons were sampled.
pioneered by George Udny Yule in “An Investigation into the Causes of Changes in Pauperism in England, Chiefly during the Last Two Intercensal Decades,” Journal of the Royal Statistical Society, vol. 62, no. 2, June 1899, pages 249–295.
Student of statistician Karl Pearson (Pearson’s correlation …) and Galton’s protege.
Yule realized that Galton’s regression method could be extended to include many variables (multiple regression).
In an 1899 MLR was used to link the administration of the English Poor Laws in different counties to the likelihood county residents were poor, while controlling for population growth and the age distribution in the county.
The poor laws provided subsistence for the indigent, usually by offering shelter and employment in institutions called workhouses.
Yule was particularly interested in whether the practice of outdoor relief, which provided income support for poor people without requiring them to move to a workhouse, increased poverty rates by making pauperism less onerous.
This is a well-defined causal question much like those that occupy social scientists today.
Statistics has a dark past.
It was used and developed in the disposal of really terrible things like Eugenics.
But the world was terrible then.
Nowadays, same statistical methods are fundamental for revealing causal effects as 100 years ago.

MK-068-EN (TM) WS2024/25. (c) Eduard Bukin