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:44] – [box plot] 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/> |
b/head_first_statistics/visualization.1756856655.txt.gz · Last modified: 2025/09/03 08:44 by hkimscil