Created
August 2, 2020 17:54
-
-
Save tradingbills/5f7db5f3534193b97bf65099b67470b7 to your computer and use it in GitHub Desktop.
Revisions
-
tradingbills created this gist
Aug 2, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ z_score <- function(x, m, sd){ return ((x-m)/sd) } x_val <- function(z, m, sd){ return (z*sd + m) } m <- 100 sd <- 15 z_score(130, m, sd) pnorm(2) a <- 1 - pnorm(2) b <- 1 - pnorm(-2) b - a 1-.9772499 # https://www.youtube.com/watch?v=mai23vW8uFM # How many people have an IQ above an IQ of 130, where the mean is 100 and the sd is 15 m <- 100 sd <- 15 1 - pnorm(z_score(130, m, sd)) # How many people have an IQ above an IQ of 145, where the mean is 100 and the sd is 15 1 - pnorm(z_score(145, m, sd)) # https://www.youtube.com/watch?v=CjF_yQ2N638&list=PLiIsR5PZj8mvM09Zl5X8CqK8uhUdo1cow&index=2&t=287s 7:46 x_val(1.4, 50, 10) z_score(30, 50, 10)