ME1 lab
Everything on the site to practice ME1 with nothing to install: the R playground, with the RStudio panes, for the scripts of every topic and the simulators for the theory, in syllabus order.
sergio@learns:~/lab/me1$ ls --by-topic
Statistics with Rthe R practicals
- webRRLike RStudio, in your browser
- Topic
- R from scratch and the scripts for every topic
- Helps you see
- Running the scripts in the articles with «Open in the playground», opening the data frame with View() and seeing the plot straight away, without installing R or RStudio.
$ Rscript grades.RReview the theory: R from scratch and the scripts for every topic
Probability and inferencetopics 3 to 11
- d · p · qProbability distributionsEleven distributions with R’s d, p and q functions: the area each call computes, the ≥ trick for discrete variables and the quantiles
- Topic
- Discrete and continuous random variables, the normal and the sampling ones
- Helps you see
- Which area each R call computes (dbinom, pnorm, qt…), why P(X ≥ 5) is 1 − pbinom(4) and where a quantile comes from.
$ distribution --pbinom 3 --size 10 --prob 0.25Review the theory: Discrete and continuous random variables, the normal and the sampling ones - x̄ · σ/√nCentral limit theoremThousands of samples from a die, a bus wait or a loaded coin: their means form a bell N(μ, σ/√n)
- Topic
- Inequalities and limit theorems
- Helps you see
- How the means of any population end up as a bell N(μ, σ/√n), and why n matters more the more skewed it is.
$ clt --population die --n 30Review the theory: Inequalities and limit theorems - x̄ ± z · σ/√nConfidence intervalsA hundred samples, a hundred intervals: how many catch μ with z, with t or for a proportion, and what happens when you change the level or n
- Topic
- Confidence intervals and sample size
- Helps you see
- What 95 % means with a hundred intervals at once, when z and when t, and how they change with the level and n.
$ interval --level 0.95 --n 25Review the theory: Confidence intervals and sample size
