Welcome to the course webpage of ECON221!
Official course description
This course is an introductory subject in statistical data analysis. Emphasis is given to the understanding of basic statistical tools and techniques as used by practicing economists. The course will cover concepts from introductory statistics and probability theory, discrete and continuous random variables, expectations, tests of hypotheses and applications.
Course diary
2025-11-27 (online)
The mathematics of the long run, Slides 72 to 89 here
Returning to M&M and Chips Ahoy – how do these examples differ from the binomial case?
2025-11-24 (face-to-face)
2025-11-20 (pre-recorded)
- Working through the midterm exam in preparation for the final exam
- Practice Set 03
2025-11-17 (shifted online)
- The mathematics of the long run, Slides 41 to 61 here
2025-11-13 (online)
2025-11-10
Classes suspended because of super-typhoon.
2025-11-06 (pre-recorded)
The mathematics of the long run, Slides 18 to 40 here
- How to implement binomial distribution calculations in R:
dbinom(),pbinom() - Apply to the following use cases: dogs and human gestures, left-handed scientists
- Relate to \(p\)-value calculations
- How does the shape of the binomial distribution get affected by the parameters?
- Idea behind a confidence interval
- How to construct a confidence interval for \(\pi\) in the binomial case
- How to implement binomial distribution calculations in R:
2025-11-03 (face-to-face)
Exercise on uncertain project choices
- Application of random variables and the mathematical language
- Use cases in structured decision-making in organizations: Videos on structured decision-making from the US Geological Survey (USGS)
The mathematics of the long run, Slides 13 to 18 here
- Contrast with the exercise given in class
- How to complete a probability distribution (fill in the tables) if you do not have complete information
- Use case: Do dogs understand human gestures?
2025-10-27 and 2025-10-30
Independent learning week - no lectures at all
2025-10-23 (pre-recorded)
2025-10-20 (shifted online)
The mathematics of the long run, Slides 1 to 8 here
- R commands:
==,sum(), and more onsample() - Specifically,
sample(1:4, 4, prob = c(0.25, 0.25, 0.25, 0.25), replace = FALSE)to implement the sick joke described in the slides. This is the same assample(1:4). - Checking if baby returned to correct mother:
sample(1:4) == 1:4 - Counting how many babies returned to correct mother:
sum(sample(1:4) == c(1,2,3,4))orsum(sample(1:4) == 1:4) - Repeat the random assignment and the checking 100 times:
replicate(100, sum(sample(1:4) == c(1,2,3,4))) - Look at summary information resulting from repeated hypothetical assignments of babies to mothers:
table(replicate(100, sum(sample(1:4) == c(1,2,3,4))))andmean(replicate(100, sum(sample(1:4) == c(1,2,3,4)))) - Find the probability distribution of \(X\), where \(X\) is defined as how many babies were returned to the correct mother. Get exact answers to validate simulation results.
- R commands:
2025-10-16 (online)
Probabilistic and statistical thinking, Slides 27 to 38 here
- Slide 27: Exercise for practice
- How to make decisions under uncertainty
- Expressing uncertainty about some crucial variables in a decision
- Looking at “hypothetical futures”
- R commands:
sample(),quantile(),seq()
2025-10-13 (face-to-face)
Probabilistic and statistical thinking, Slides 1 to 26 here
- Recap of dogs and human gestures
- Digging into more details regarding the argument used
- Introduced hypothesis testing for a special case
- Worked on similar exercises
Dedicated webpage for you to modify code for the simulation-based \(p\)-value
2025-10-09 (online)
Recap of Monte Carlo simulations
Probabilistic and statistical thinking, Slides 1 to 15 here
- Distinction between empirical and theoretical quantities
- Scientific investigations
2025-10-06 (face-to-face)
- Recap and then continue with Monte Carlo simulations in R, specifically about how the sample mean behaves under different datasets collected under the same conditions (or if you wish, tossed a fair coin \(n\) times for
nsimtimes) - Motivated the need for this kind of thought experiment – tossing a fair coin and net weight of Chips Ahoy for V26 and net weight for M&Ms for V27
- Quiz, solutions here
2025-10-02 (online)
- Describing distributions, slides 36 to 37, 42 to 44
- Finished first set of slides, skip slides 45 to 48
- Introduced IPUMS ACS data
- Motivating the next major topic of the course: material here, finished until section of “Learn bits of R”
- Practice Set 01
2025-09-29 (face-to-face)
- Recap of pre-recording
- Worked on alternative forms of the regression line
- Discussed a bit on why it is called “regression”
- Exercise
2025-09-25 (pre-recorded)
Describing distributions, slides 35, 42 to 44
- Interactive R script
- Wrap up almost all the mathematics for regression
- Connections to numerical summaries
- The meaning of correlation
2025-09-22 (shifted online)
Describing distributions, updated slides 31 to 34 and 38 to 41
- R commands:
tapply(),as.factor() - Regression lines when there is only an intercept, when there is a variable taking multiple possible values like
NetSalesMil, when there is a dummy variable - Provide suggestive examples to show that regressions are about averages or comparisons of averages
- Importance of the “hat” notation and what information it conveys
- Optimization problem underlying regression
- R commands:
Note for slide 40: It is possible to use
lm(TotalCompMil ~ as.factor(Industry=="Energy"), data=eCsub)so that we can shorten the command. But do you think it will work for the commands in slide 39?
2025-09-18 (pre-recorded)
Describing distributions, slides 19 to 30
- R commands:
plot(),lm(),log10(),log(), subset()` - Other numerical summaries
- How to find median, IQR, percentiles, mean, and SD if you only have a histogram
- Linear and nonlinear transformations – Impact on visualizations and numerical summaries, what information can transformations convey
- Scatterplots and regressions
- Meaning of regression intercept and regression slope
- R commands:
2025-09-15 (face-to-face)
Describing distributions, slides 11 to 19
- R commands:
mean(),sd(),apply(),abs() - Geometric interpretation of the objective function which the mean minimizes
- Digging into the meaning of standard deviation
- \(z\)-scores and why they are useful
- Empirical rule
- R commands:
2025-09-11 (online)
2025-09-08 (face to face)
Describing distributions, slides 6 to 8
- Jumping into R:
<-,c(),read.csv(),names(),merge(),head(),hist(),boxplot() - R features: help and autocomplete (tab key), user input and default settings for commands
- Histograms two ways – frequency/counts on vertical axis or density on vertical axis
- Value of histograms drawn on a density scale
- Attention to units
- How to get percentile information from a histogram
- What information does a boxplot (or box and whiskers plot) have, treatment of whiskers vary across textbooks and software (refer to section on Whiskers in this wiki entry and this article from the American Society for Quality to get a sense that treatment of boxplots can vary)
- Jumping into R:
Advice for R: Experiment with the commands, ask for help e.g.
?read.csv()Cannot install RStudio in your computer?
- Make sure you have installed R first – Windows users, Mac users
- Installing base is enough now. Mac users should know their version/flavor of Mac.
- If all else fails, either (1) bring your computer before class starts (or class ends) and let me have a look or (2) use Google Colab.
Short quiz, solutions here
2025-09-04 (online)
Describing distributions, slides 1 to 6
Descriptive statistics involving a sensitive topic
- Book on the Kinsey data: Requires an account to borrow and read online
- Ansell research study findings
- King (2021), Journal of Sex & Marital Therapy, open access
- Herbenick et al (2014), The Journal of Sexual Medicine, copy
- Johnston et al (2014), Psychology of Men & Masculinity, require DLSU login
2025-09-01 (shifted online)
- Getting to know your background
- Statistics around us
- A bit on the syllabus