Assignment Chef icon Assignment Chef
All English tutorials

Programming lesson

Mastering Key Concepts in STATS101/101G/108: A Tutorial with Modern Examples

Understand categorical vs. numerical data, longitudinal studies, randomization tests, confidence intervals, and more with clear explanations and timely examples from gaming, AI, and finance.

STATS101 STATS101G STATS108 categorical data longitudinal study randomization test causation inference bootstrap confidence interval sample size null hypothesis t-test normality Chi-square test correlation coefficient statistical significance practical significance study design

Introduction to STATS101/101G/108 Core Concepts

Statistics is the science of learning from data. In courses like STATS101/101G/108, you will encounter foundational ideas that underpin data analysis in fields from AI to finance. This tutorial breaks down key concepts from Block 1 and Block 2, using modern examples to make them stick.

Categorical vs. Numerical Data

Data from a categorical variable are group or category names for each entity. For example, in a gaming survey, the console type (PlayStation, Xbox, Nintendo) is categorical. In contrast, numerical data are measurements or counts, like hours played per week. Understanding this distinction is crucial for choosing the right analysis.

Longitudinal Studies

A study that observes the same group of individuals over a long period is called a longitudinal study. Think of tracking the performance of a single AI model over multiple training epochs. This design helps detect changes over time, unlike a cross-sectional snapshot.

Randomization Tests and Causation

In a well-designed experiment, a tail proportion of less than 5% in a randomization test allows us to make experiment-to-causation inference. For instance, if you randomly assign users to use a new finance app or a control, and the app group shows significantly higher savings, a low p-value suggests the app caused the increase.

Random Sampling

Using random sampling allows for the calculation of the likely size of sampling errors. It does not guarantee representative samples but enables us to quantify uncertainty. In school life, a random sample of students' exam scores gives a margin of error for the school average.

Bootstrap Confidence Intervals

A bootstrap confidence interval may be interpreted as an interval of plausible values for the parameter. It is not certain to contain the true value, but 95% of such intervals from repeated sampling will. For example, bootstrapping the median time spent on a viral app gives a range for the population median.

Sample Size and Confidence Intervals

All other things being equal, bigger sample sizes give narrower confidence intervals. This is like having more data from an AI training set — the model's performance estimate becomes more precise.

Null and Research Hypotheses

The null hypothesis, H₀, is the hypothesis we test, typically of no effect. The research hypothesis is what we hope to support. In sports analytics, H₀ might be that a new training method does not improve sprint times.

t-test and Normality

When conducting a t-test, a plot of the sample data is used to check for evidence of non-Normal features. Skewness or outliers can violate the normality assumption, especially in small samples.

Chi-square Test for Independence

For a Chi-square test for independence, there is evidence against H₀ if there are relatively large differences between observed and expected counts in one or more cells. Imagine a gaming company testing if game genre preference is independent of age group — large deviations suggest a link.

Correlation and Regression

The sign of the sample correlation coefficient, r, is always the same as the sign of the slope of the least squares regression line. Both indicate the direction of a linear relationship. For instance, in finance, the correlation between stock returns and market index is positive if both move together.

True/False Insights

Skewed Data and Median

For highly skewed data, the sample median is a more sensible measure of the centre than the mean. This is true because the mean is pulled by extreme values. In income data, median is often reported.

Observational Studies and Causation

An observational study cannot reliably establish cause and effect. This is false if claimed otherwise. Confounding variables lurk — e.g., a study linking coffee drinking to heart health may be confounded by lifestyle.

Chance Alone in Group Comparisons

Under chance alone, the observed difference between two groups is purely due to which units ended up in which group. This is true in a randomized experiment if H₀ holds.

Larger Samples and Bias

Taking larger samples will not reduce selection bias or nonsampling errors. This is true — bias is not fixed by size. A badly designed survey of AI users remains biased even with 10,000 responses.

Certainty in Confidence Intervals

We cannot be certain the true parameter lies in a bootstrap interval. This statement is false. The interval is plausible, not guaranteed.

Level of Confidence

The level of confidence is the long-run success rate of the method. This is true. If we compute many 95% intervals, about 95% will contain the parameter.

Statistical vs. Practical Significance

Statistical significance does not imply practical significance. This is false? Actually the statement is false — significance may be due to large sample size, not real-world importance.

F-test P-value

If the P-value for an F-test is large, the differences between sample means could be due to chance alone. This is true.

Chi-square Test Statistic

The greater the Chi-square statistic, the stronger the evidence against H₀. So the statement that greater value means weaker evidence is false.

Correlation Coefficient

The correlation coefficient measures strength and direction of a linear relationship. This is true.

Block 2: Study Design and Interpretation

Consider a study on time restriction and reported numbers. The experiment randomly allocated participants to TimeRestriction or NoTimeRestriction groups. The response variable was ReportedNumber. Researchers were blinded? Actually they did not know the actual number rolled, so they were blinded. The NoTimeRestriction group served as control. The design was completely randomized. For Figure 2, statements about counts and medians must be checked. For Figure 3, participants in TimeRestriction tended to report higher numbers. The p-value was less than 5%, giving evidence that time restriction caused higher rolls. This is a classic example of randomization test leading to causation.

Conclusion

Mastering these concepts — from data types to hypothesis testing — builds a strong foundation for further study in statistics, data science, and AI. Use modern examples like gaming leaderboards, AI model comparisons, or finance apps to solidify your understanding.