The Central Limit Theorem - Statistics by Simulation in R

Поделиться
HTML-код
  • Опубликовано: 21 янв 2025

Комментарии • 4

  • @Mehraj_IITKGP
    @Mehraj_IITKGP Год назад +1

    great explaination. Here is the code explained in the lecture:
    nSimulations = 100000
    nSample = 100
    Y = numeric(nSimulations)
    for(i in 1:nSimulations){
    X = runif(n);
    Y[i] = mean(X)
    }
    sigma = sd(Y)
    mu = mean(Y)
    hist((Y-mu)/sigma, breaks = 50)
    Here, I have scaled and shifted the random variable to make it the standard normal. Also, you can replace runif() with any other distribution of your choice.

  • @susannoh1694
    @susannoh1694 4 года назад

    hello, how do you move around the lines? I was keep pressing shift+enter to go below the line without producing something..

  • @redwantragha8599
    @redwantragha8599 2 года назад

    Merci beau gosse