Articles by LeaRning Stats

Laguerre-Samuelson Inequality

September 12, 2019 | LeaRning Stats

Chebychev’s Theorem gives bounds on how spread out a probability distribution can be from the mean, in terms of the standard deviation. More precisely, if \(X\) is a random variable with mean \(\mu\) and standard deviation \(\sigma\), then \[ P(|X - ... [Read more...]

Advent of Code Day 14

December 24, 2018 | LeaRning Stats

Introduction Advent of code 2018, day 14, was a tough one to do in R. Here is a link. I did this problem a lot of different ways, trying to find a nice way to do it. In the end, I did it using vectors in base R, data.table and finally ... [Read more...]

On power and effect size

November 8, 2018 | LeaRning Stats

Introduction I have seen a lot of tweets on my feed about power and effect size. I wanted to think about those things carefully, so I did some reading and am writing down some thoughts. An interesting paper that I read on this is here The takeaway is that studies ...
[Read more...]

Copula Sampling

October 31, 2018 | LeaRning Stats

Introduction I was reading about different ways to sample from distributions, and one that caught my eye was based on copulas. There is an answer here, but there seemed to be enough details left to the reader that I wanted to just do it. One variable example To start, let’...
[Read more...]

Prediction Bands

April 6, 2018 | LeaRning Stats

Introduction In this post, we study a seemingly easy question; what is a 95% prediction interval in simple linear regression? We assume that our data comes from \[ y_i = 1 + 2x_i + \epsilon_i \] where \(\epsilon_i\) are iid normal with mean 0 and standard deviation 3. R Code for Prediction We can build ...
[Read more...]

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)