• Descriptive
    • Moments
    • Concentration
    • Central Tendency
    • Variability
    • Stem-and-Leaf Plot
    • Histogram & Frequency Table
    • Data Quality Forensics
    • Conditional EDA
    • Quantiles
    • Kernel Density Estimation
    • Normal QQ Plot
    • Bootstrap Plot

    • Multivariate Descriptive Statistics
  • Distributions
    • Binomial Probabilities
    • Geometric Probabilities
    • Negative Binomial Probabilities
    • Hypergeometric Probabilities
    • Multinomial Probabilities
    • Poisson Probabilities

    • Exponential
    • Gamma
    • Erlang
    • Weibull
    • Rayleigh
    • Lognormal
    • Pareto
    • Inverse Gamma

    • Beta
    • Power
    • Beta Prime (Inv. Beta)
    • Triangular

    • Normal (area)
    • Logistic
    • Laplace
    • Cauchy (standard)
    • Cauchy (location-scale)
    • Gumbel

    • Normal RNG
    • ML Fitting
    • Tukey Lambda PPCC
    • Box-Cox Normality Plot
    • Sample Correlation r

    • Empirical Tests
  • Hypotheses
    • Theoretical Aspects of Hypothesis Testing
    • Bayesian Inference
    • Minimum Sample Size

    • Empirical Tests
    • Multivariate (pair-wise) Testing
  • Models
    • Manual Model Building
  • Time Series
    • Time Series Plot
    • Decomposition
    • Exponential Smoothing

    • Blocked Bootstrap Plot
    • Mean Plot
    • (P)ACF
    • VRM
    • Standard Deviation-Mean Plot
    • Spectral Analysis
    • ARIMA

    • Cross Correlation Function
    • Granger Causality
  1. Probability Distributions
  2. 44  Problems
  • Preface
  • Getting Started
    • 1  Introduction
    • 2  Why Do We Need Innovative Technology?
    • 3  Basic Definitions
    • 4  The Big Picture: Why We Analyze Data
  • Introduction to Probability
    • 5  Definitions of Probability
    • 6  Jeffreys’ axiom system
    • 7  Bayes’ Theorem
    • 8  Sensitivity and Specificity
    • 9  Naive Bayes Classifier
    • 10  Law of Large Numbers

    • 11  Problems
  • Probability Distributions
    • 12  Bernoulli Distribution
    • 13  Binomial Distribution
    • 14  Geometric Distribution
    • 15  Negative Binomial Distribution
    • 16  Hypergeometric Distribution
    • 17  Multinomial Distribution
    • 18  Poisson Distribution

    • 19  Uniform Distribution (Rectangular Distribution)
    • 20  Normal Distribution (Gaussian Distribution)
    • 21  Gaussian Naive Bayes Classifier
    • 22  Chi Distribution
    • 23  Chi-squared Distribution (1 parameter)
    • 24  Chi-squared Distribution (2 parameters)
    • 25  Student t-Distribution
    • 26  Fisher F-Distribution
    • 27  Exponential Distribution
    • 28  Lognormal Distribution
    • 29  Gamma Distribution
    • 30  Beta Distribution
    • 31  Weibull Distribution
    • 32  Pareto Distribution
    • 33  Inverse Gamma Distribution
    • 34  Rayleigh Distribution
    • 35  Erlang Distribution
    • 36  Logistic Distribution
    • 37  Laplace Distribution
    • 38  Gumbel Distribution
    • 39  Cauchy Distribution
    • 40  Triangular Distribution
    • 41  Power Distribution
    • 42  Beta Prime Distribution
    • 43  Sample Correlation Distribution

    • 44  Problems
  • Descriptive Statistics & Exploratory Data Analysis
    • 45  Types of Data
    • 46  Datasheets

    • 47  Frequency Plot (Bar Plot)
    • 48  Frequency Table
    • 49  Contingency Table
    • 50  Binomial Classification Metrics
    • 51  Confusion Matrix
    • 52  ROC Analysis

    • 53  Stem-and-Leaf Plot
    • 54  Histogram
    • 55  Data Quality Forensics
    • 56  Quantiles
    • 57  Central Tendency
    • 58  Variability
    • 59  Skewness & Kurtosis
    • 60  Concentration
    • 61  Notched Boxplot
    • 62  Scatterplot
    • 63  Pearson Correlation
    • 64  Rank Correlation
    • 65  Partial Pearson Correlation
    • 66  Simple Linear Regression
    • 67  Moments
    • 68  Quantile-Quantile Plot (QQ Plot)
    • 69  Normal Probability Plot
    • 70  Probability Plot Correlation Coefficient Plot (PPCC Plot)
    • 71  Box-Cox Normality Plot
    • 72  Kernel Density Estimation
    • 73  Bivariate Kernel Density Plot
    • 74  Conditional EDA: Panel Diagnostics
    • 75  Bootstrap Plot (Central Tendency)
    • 76  Survey Scores Rank Order Comparison
    • 77  Cronbach Alpha

    • 78  Equi-distant Time Series
    • 79  Time Series Plot (Run Sequence Plot)
    • 80  Mean Plot
    • 81  Blocked Bootstrap Plot (Central Tendency)
    • 82  Standard Deviation-Mean Plot
    • 83  Variance Reduction Matrix
    • 84  (Partial) Autocorrelation Function
    • 85  Periodogram & Cumulative Periodogram

    • 86  Problems
  • Hypothesis Testing
    • 87  Normal Distributions revisited
    • 88  The Population
    • 89  The Sample
    • 90  The One-Sided Hypothesis Test
    • 91  The Two-Sided Hypothesis Test
    • 92  When to use a one-sided or two-sided test?
    • 93  What if \(\sigma\) is unknown?
    • 94  The Central Limit Theorem (revisited)
    • 95  Statistical Test of the Population Mean with known Variance
    • 96  Statistical Test of the Population Mean with unknown Variance
    • 97  Statistical Test of the Variance
    • 98  Statistical Test of the Population Proportion
    • 99  Statistical Test of the Standard Deviation \(\sigma\)
    • 100  Statistical Test of the difference between Means -- Independent/Unpaired Samples
    • 101  Statistical Test of the difference between Means -- Dependent/Paired Samples
    • 102  Statistical Test of the difference between Variances -- Independent/Unpaired Samples

    • 103  Hypothesis Testing for Research Purposes
    • 104  Decision Thresholds, Alpha, and Confidence Levels
    • 105  Bayesian Inference for Decision-Making
    • 106  One Sample t-Test
    • 107  Skewness & Kurtosis Tests
    • 108  Paired Two Sample t-Test
    • 109  Wilcoxon Signed-Rank Test
    • 110  Unpaired Two Sample t-Test
    • 111  Unpaired Two Sample Welch Test
    • 112  Two One-Sided Tests (TOST) for Equivalence
    • 113  Mann-Whitney U test (Wilcoxon Rank-Sum Test)
    • 114  Bayesian Two Sample Test
    • 115  Median Test based on Notched Boxplots
    • 116  Chi-Squared Tests for Count Data
    • 117  Kolmogorov-Smirnov Test
    • 118  One Way Analysis of Variance (1-way ANOVA)
    • 119  Kruskal-Wallis Test
    • 120  Two Way Analysis of Variance (2-way ANOVA)
    • 121  Repeated Measures ANOVA
    • 122  Friedman Test
    • 123  Testing Correlations
    • 124  A Note on Causality

    • 125  Problems
  • Regression Models
    • 126  Simple Linear Regression Model (SLRM)
    • 127  Multiple Linear Regression Model (MLRM)
    • 128  Logistic Regression
    • 129  Generalized Linear Models
    • 130  Multinomial and Ordinal Logistic Regression
    • 131  Cox Proportional Hazards Regression
    • 132  Conditional Inference Trees
    • 133  Leaf Diagnostics for Conditional Inference Trees
    • 134  Hypothesis Testing with Linear Regression Models (from a Practical Point of View)

    • 135  Problems
  • Introduction to Time Series Analysis
    • 136  Case: the Market of Health and Personal Care Products
    • 137  Decomposition of Time Series
    • 138  Ad hoc Forecasting of Time Series
  • Box-Jenkins Analysis
    • 139  Introduction to Box-Jenkins Analysis
    • 140  Theoretical Concepts
    • 141  Stationarity
    • 142  Identifying ARMA parameters
    • 143  Estimating ARMA Parameters and Residual Diagnostics
    • 144  Forecasting with ARIMA models
    • 145  Intervention Analysis
    • 146  Cross-Correlation Function
    • 147  Transfer Function Noise Models
    • 148  General-to-Specific Modeling
  • References
  • Appendices
    • Appendices
    • A  Method Selection Guide
    • B  Presentations and Teaching Materials
    • C  R Language Concepts for Statistical Computing
    • D  Matrix Algebra
    • E  Standard Normal Table (Gaussian Table)
    • F  Critical values of Student’s \(t\) distribution with \(\nu\) degrees of freedom
    • G  Upper-tail critical values of the \(\chi^2\)-distribution with \(\nu\) degrees of freedom
    • H  Lower-tail critical values of the \(\chi^2\)-distribution with \(\nu\) degrees of freedom

Table of contents

  • 44.1 Generating Random Numbers
    • 44.1.1 Task 1
    • 44.1.2 Task 2
    • 44.1.3 Task 3
  • 44.2 ML Fitting
    • 44.2.1 Task 4
    • 44.2.2 Task 5
    • 44.2.3 Task 6
    • 44.2.4 Task 7
    • 44.2.5 Task 8
DRAFT This draft is under development — DO NOT CITE OR SHARE.
  1. Probability Distributions
  2. 44  Problems

44  Problems

44.1 Generating Random Numbers

44.1.1 Task 1

  • Problem
  • Solution

Generate 50 Random Numbers from an F(20,10) Distribution. Hint: search for the term “Distributions” in RStudio’s help box and click on the link for the F Distribution to find the R command that is needed.

Since there’s no R module available, we write a short script and execute it in RStudio.

r <- rf(50, df1 = 20, df2 = 10)
print(r)
 [1] 0.7164293 0.5715072 3.8333988 1.3046471 0.6167877 0.5964706 0.5128478
 [8] 1.9986952 0.9620561 1.4903509 0.8180831 0.9552133 1.0349692 1.4758428
[15] 0.9511832 1.2084786 2.3487218 0.4576532 2.3600193 1.4955360 0.7054611
[22] 1.0602085 1.1521606 0.2874595 1.2798676 0.9196450 0.3591862 1.7786760
[29] 1.0983283 0.6472056 0.6059743 0.5843003 0.7415580 1.1024611 0.9206670
[36] 0.6752726 0.3052688 2.5836383 0.7386852 0.5257029 1.1902902 0.3472542
[43] 2.4318373 1.0458847 0.6916868 0.8643180 1.1493455 1.1845563 1.2363217
[50] 0.9197990

44.1.2 Task 2

  • Problem
  • Solution

Empirically show that the Histogram of the Chi-squared Density becomes increasingly bell-shaped and resembles a Normal Histogram as the degrees of freedom increase.

We just need to plot Histograms for increasing numbers of degrees of freedom. The third Histogram looks very similar in shape to a Normal Density.

Strictly speaking, convergence to a standard Normal requires standardization: \[ \frac{\chi^2(n)-n}{\sqrt{2n}} \Rightarrow \text{N}(0,1). \]

hist(rchisq(500, df = 2))

hist(rchisq(500, df = 20))

hist(rchisq(500, df = 2000))

44.1.3 Task 3

  • Problem
  • Solution

Generate 30 random numbers from the N(5,2) Density function, plot the corresponding Histogram, and overlay the theoretical Density function. Evaluate whether or not the Histogram resembles the theoretical Density.

Repeat the experiment but with 300 observations and comment on what you observe.

To make this solution reproducible, we first set the random seed to 142. After that, we generate random numbers through the rnorm function and display the corresponding Histogram and overlayed curve based of the N(5,2) Density function.

The output clearly illustrates the effect of the Law of Large Numbers from Chapter 10 (the Histogram with 300 random numbers is much closer to the theoretical Density function than with only 30 values).

set.seed(142)
mymean = 5
mysd = 2
x = rnorm(30, mean = mymean, sd = mysd)
myhist<-hist(x, freq=F)
curve(1/(mysd*sqrt(2*pi))*exp(-1/2*((x-mymean)/mysd)^2), min(x), max(x), add=T)

x = rnorm(300, mean = mymean, sd = mysd)
myhist<-hist(x, freq=F)
curve(1/(mysd*sqrt(2*pi))*exp(-1/2*((x-mymean)/mysd)^2), min(x), max(x), add=T)

44.2 ML Fitting

The following tasks are based on a spreadsheet which contains simulated distributions: online spreadsheet.

Note: this spreadsheet refreshes random values over time. For strict reproducibility, save a local snapshot (or reproduce the data in R with a fixed set.seed).

Quick intuition: in these tasks, ML fitting and plots are used as screening tools. They help us see whether a candidate distribution is plausible, but they are not formal goodness-of-fit tests. For formal testing procedures and p-value based decisions, see Section 116.1 and Chapter 117 (also summarized in Section 2).

44.2.1 Task 4

  • Problem
  • Solution

Examine any variable \(U_i\) for \(i = 1, 2, …, 12\) (in columns A:L) and show that it cannot be described well by a Normal Density function. Hint: use the so-called ML Fitting module to do this.

Just copy & paste the values of the chosen column (in the online spreadsheet) into the “Univariate Dataset” text box and observe the output of the analysis. Note: the spreadsheet always updates the random values – therefore, your result will not exactly look identical.

Interactive Shiny app (click to load).
Open in new tab

44.2.2 Task 5

  • Problem
  • Solution

What is the distribution of the data series from Task 4? Use a theoretical argument to answer this question.

The Histogram from Figure that is displayed in the ML Fitting module (see solution of Task 4) is consistent with the fact that the random numbers were generated by a digital computer which typically uses a Uniform Distribution (see Section 19.11).

44.2.3 Task 6

  • Problem
  • Solution

Show that the data series in column M is approximately normally distributed (based on ML Fitting).

The formula of column M is based on Section 20.22 (i.e. a sum of twelve Uniform variates minus 6). Hence, we expect the data in column M to be approximately normally distributed with \(\mu = 0\) and \(\sigma = 1\).

The ML Fitting method yields the following results (your results may be slightly different):

  • mean = 0.003791167

  • standard deviation = 1.028944237

The estimates of both parameters are close to the theoretical values. Due to the Law of Large Numbers, these estimates will get closer to the theoretical values as the number of simulated random numbers increases.

Interactive Shiny app (click to load).
Open in new tab

44.2.4 Task 7

  • Problem
  • Solution
  • ML Fitting column N
  • ML Fitting column O

Examine the data in columns N and O. Show that these are not normally distributed and explain (based on theoretical argumentation) why they have a \(\chi^2(n)\) distribution. What is the parameter \(n\)?

The data in columns N and O do not appear to be normally distributed based on the computations found in tab “ML Fitting column N” and “ML Fitting column O”.

The theoretical reason for this is that both columns contain a formula which computes -2 times the natural logarithm of the product of Uniformly distributed variates as is described in Section 23.13. In theory the parameter \(n\) should be equal to 12 (i.e. twice the number of Uniform variates).

Interactive Shiny app (click to load).
Open in new tab
Interactive Shiny app (click to load).
Open in new tab

44.2.5 Task 8

  • Problem
  • Solution
  • ML Fitting column P

If \(Y \sim \text{N}(0,1)\), what is the distribution of \(Y^2\)? Hint: there is a theoretical argument and you can also use the simulated data in column P.

According to theory, the variable \(Y^2 \sim \chi^2(n=1)\) because of Section 23.16. The parameter \(n = 1\) because we only use one normal variate. The ML Fitting method applied to column P can be found in the “ML Fitting column P” tab.

The computation shows that the estimated degrees of freedom is very close to 1 (i.e. the theoretical value). In addition, the Histogram shows that the Chi-squared density function fits the data well.

Interactive Shiny app (click to load).
Open in new tab
Descriptive Statistics & Exploratory Data Analysis

© 2026 Patrick Wessa. Provided as-is, without warranty.

Feedback: e-mail | Anonymous contributions: click to copy (Sats) | click to copy (XMR)

Cookie Preferences