b:head_first_statistics:visualization
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| b:head_first_statistics:visualization [2025/09/03 08:43] – [Histogram skewedness] hkimscil | b:head_first_statistics:visualization [2025/09/08 08:22] (current) – [Histogram Modality] hkimscil | ||
|---|---|---|---|
| Line 91: | Line 91: | ||
| </ | </ | ||
| {{: | {{: | ||
| + | |||
| + | < | ||
| + | dat.iq <- rnorm(1000, 100, 15) | ||
| + | head(dat.iq) | ||
| + | tail(dat.iq) | ||
| + | head(dat.iq, | ||
| + | tail(dat.iq, | ||
| + | |||
| + | mean(dat.iq) | ||
| + | sd(dat.iq) | ||
| + | |||
| + | hist(dat.iq) | ||
| + | hist(dat.iq, | ||
| + | |||
| + | set.seed(101) | ||
| + | dat.iq <- rnorm(1000, 100, 15) | ||
| + | head(dat.iq) | ||
| + | tail(dat.iq) | ||
| + | head(dat.iq, | ||
| + | tail(dat.iq, | ||
| + | |||
| + | mean(dat.iq) | ||
| + | sd(dat.iq) | ||
| + | |||
| + | hist(dat.iq) | ||
| + | hist(dat.iq, | ||
| + | </ | ||
| ====== Scatter plot ====== | ====== Scatter plot ====== | ||
| < | < | ||
| Line 304: | Line 331: | ||
| # Parameters for the second normal distribution (Mode 2) | # Parameters for the second normal distribution (Mode 2) | ||
| m.2 <- 100 | m.2 <- 100 | ||
| - | sd.2 <- 8 | + | sd.2 <- 15 |
| m.3 <- 160 | m.3 <- 160 | ||
| Line 312: | Line 339: | ||
| prop.1 <- 0.3 | prop.1 <- 0.3 | ||
| # Mixing proportion for Mode 2 | # Mixing proportion for Mode 2 | ||
| - | prop.2 <- 0.4 # This is 1 - prop1 | + | prop.2 <- 0.6 # This is 1 - prop1 |
| # Mixing proportion for Mode 2 | # Mixing proportion for Mode 2 | ||
| - | prop.3 <- 0.3 # This is 1 - prop1 | + | prop.3 <- 1.0 # This is 1 - prop1 |
| # Number of samples to generate | # Number of samples to generate | ||
| Line 347: | Line 374: | ||
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| - | {{: | + | {{: |
| </ | </ | ||
| <WRAP clear/> | <WRAP clear/> | ||
| Line 353: | Line 380: | ||
| ====== box plot ====== | ====== box plot ====== | ||
| + | <WRAP column half> | ||
| < | < | ||
| # Boxplot of MPG by Car Cylinders | # Boxplot of MPG by Car Cylinders | ||
| Line 361: | Line 388: | ||
| ylab=" | ylab=" | ||
| </ | </ | ||
| - | {{: | + | </ |
| + | <WRAP column half> | ||
| + | {{: | ||
| + | </ | ||
| + | <WRAP clear/> | ||
| ====== see also ====== | ====== see also ====== | ||
| https:// | https:// | ||
b/head_first_statistics/visualization.1756856601.txt.gz · Last modified: by hkimscil
