This extensive summary contains all the theory presented in the JBM050 Statistical Computing course given at the TU/e in cooperation with TiU in 2020/2021. It also includes examples and pseudocode to help you prepare well for the assignments and the exam!
Statistical Computing
Introduction 3
Recap mathematical models (distributions) 3
Multinomial coef cients 3
Basic Concepts 5
The Normal (Gaussian) distribution 5
Sample statistics as estimators of population parameters 5
Sampling distribution 5
Accuracy of Sample Statistics 6
Accuracy of Sample Statistics 6
MSE and BVT 6
t-statistic and Student-t distribution 6
Sampling distribution of the proportion for binary data 7
Monte Carlo Simulation 8
Quality control 8
General form of MC simulation 8
Simulations for properties of hypothesis tests 9
Optimization I and Statistical Learning 10
Introduction 10
Notation 10
Work ow of statistical modeling 11
Optimization II 13
Optimization basics 13
(Simple) Linear Regression 14
A quick recap 14
Univariate regression models 14
Estimating model parameters 15
Limits of (simple) linear regression 15
Multiple linear regression 16
Estimating the regression model 16
Predictive Model Accuracy 17
Model accuracy 17
Predictive modeling 17
Test set 18
The collinearity paradox 19
Model selection 19
Cross-Validation 20
Validation set approach 20
, LOOCV 20
K-fold CV 21
Train-Validation-Test 21
CV with non-CV model selection 21
Nested CV 22
Logistic Regression 23
The data generating model 23
Estimation 23
Iterative Optimization 24
De ning properties 24
Convergence 24
Bisection method 25
Newton’s method 26
Constrained Optimization 28
Equality constraints 28
Inequality constraints 29
Penalized Optimization 30
Penalized optimization 30
Ridge regression 30
Lasso regression 31
Recap mathematical models (distributions)
There are di erent kinds of mathematical models (distributions):
• Bernoulli distribution
X ∼ Ber n(π) where π ≠ 3.14... but p
P(X = 1) = π ; P(X = 0) = 1 − π
• Binomial distribution
X ∼ Bin(n, π)
P(X = k) = ( ) π k (1 − π)n−k
n
k
• Hypergeometric distribution
X ∼ hypergeom et r ic(N, K, n)
( k )( n − k )
K N−K
P(X = k) = where N= total elements to draw
(n)
N
K= nr. of elements with desired feature
n= nr. of draws
k = nr. of elements with feature in draws
๏ this formula holds when drawn without replacement
Note: this is just a brief recap of the di erent distributions, more elaborate descriptions can be found
in the Data Statistics summary. It is advised to look back into the Data Statistics material if subjects
in this summary are unclear.
Multinomial coef cients
This is used when a set of n distinct items needs to be divided into r distinct groups of
respective sizes n1, n 2, …, nr where ∑i=1 ni = n.
( n2 )
n − n1
So, there are (n ) choices for the rst group,
n
for the second group and so on. It
1
n!
then follows that there are possible divisions.
n1 !n 2 !…nr !
, Example 1:
10 children are to be divided in an A team and a B team of 5 each. They will play in a di erent
league.
Solution:
10!
There are
5!5!
= 252 possible divisions.
Example 2:
10 children divide themselves into two teams of 5 each.
Solution:
10!/(5!5!)
There are
2!
= 126 possible divisions, because the order is irrelevant; it is just a division,
no A and B team.
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller Lieve12. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $7.23. You're not tied to anything after your purchase.