2-1. Three Popular Data Displays

500KB
Open
Chapter 2 (Korean)
Chapter 2 (Chinese)

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.

  1. Frequency table of the 2nd column

  2. Frequency table of the 3rd column

  3. 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?