2-1. Three Popular Data Displays
1. Stem and Leaf Diagrams
EXAMPLE 1. ν΅κ³ν κ°μλ₯Ό λ£κ³ μλ 30λͺ νμμ μν μ±μ μ λ€μκ³Ό κ°λ€.
86 80 25 77 73 76 100 90 69 93
90 83 70 73 73 70 90 83 71 95
40 58 68 69 100 78 87 97 92 73μμ λ°μ΄ν°λ₯Ό κ°μννκΈ° μν λ°©λ² μ€ νλκ° stem and leaf diagramμ΄λ€.
Rμμλ μ΄λ¬ν λ°μ΄ν° ννμ μν΄ stem() ν¨μλ₯Ό μ¬μ©νλ€.
Syntax :
stem(x, scale = 1, width = 80, atom = 1e-08)arguments :
x : μμΉν 벑ν°
scale = : νλ‘―μ κΈΈμ΄λ₯Ό μ μ΄
width = : μνλ νλ‘―μ λμ΄
atom = : tolerance
[Solution]
10μ μ리 μ«μκ° stemμ΄ λκ³ , 1μ μ리 μ«μκ° leafκ° λ¨μ μ μ μλ€.
EXAMPLE 2. stemμ κ°―μλ₯Ό λ°μΌλ‘ μ€μ¬μ diagramμ κ·Έλ €λΌ.
[Solution]
2. Frequency Histograms
stem and leaf diagramμ λκ·λͺ¨ λ°μ΄ν° μΈνΈμλ μ ν©νμ§ μλ€.
μ΄ λ μ¬μ©λλ λ°©λ²μ΄ λμ λΆν¬μ΄λ€.
arguments :
x: νμ€ν κ·Έλ¨μ λ²‘ν° λ°μ΄ν°main =: νμ€ν κ·Έλ¨μ μ λͺ©xlim =: x μΆμ λ²μylim =: y μΆμ λ²μxlab =: x μΆμ μ λͺ©ylab =: y μΆμ μ λͺ©
EXAMPLE 3. μ΄μ μ stem and leaf diagramμ frequency histogramμΌλ‘ κ·Έλ €λΌ.

EXAMPLE 4. Using histogram()

EXAMPLE 5. Histogram of iris


3. Relative Frequency Histogram
EXAMPLE 6. Relative Frequency Histogram of Example 3 using histogram()

Note : y μΆμ κ°μ΄ κ°―μ(count)κ° μλ λ°±λΆμ¨(percent)λ‘ μΆλ ₯λλ€.
4. Sample size and Relative Frequency Histograms
sample sizeκ° μ»€μ§μ λ°λΌ μ 체 λͺ¨μμ μ’μ° λμΉμ μ’ λͺ¨μμ΄ λλ€.

5. A Very Fine Relative Frequency Histogram

6. Frequency Table
EXAMPLE 7. Using iris data set, Find the frequency table of the 2nd column(Sepal.Width) of iris.


8. Unstable Histogram
Type-A : Isolated Island
Type-B : Multimodal
Type-C : Outliers
Type-D : Cliff
EXAMPLE 8. Unstable Histogram


See : Using Histograms to Understand Your Data
9. Contingency Table (Cross table)
EXAMPLE 9. Using exa2_2 data set, Find the table of each one.
Frequency table of the 2nd column
Frequency table of the 3rd column
Contingency table of the 2nd and the 3rd columns.
1οΌι’ζ°(εεΈ)葨(frequency table)γ 2οΌηΈε―Ήβι’ζ°(εεΈ)葨β(relative frequency table)γ 3οΌι’ζ°εεΈεΎ(frequency diagram)γ 4οΌηΈε―Ήι’ζ°εεΈεΎ(relative frequency diagram)γ 5οΌθεΆεΎ(stem and leaf diagram)γ 6οΌζ ε½’εζ葨(contingency table)γ
Last updated
Was this helpful?