HAHS.
Back to Catalog

Box Plot

chart

Also known as: box and whisker plot, box-and-whisker diagram, five-number summary

Show distributionCompareShow deviation NumericalCategorical Bar/Column

설명 / Description

박스 플롯(또는 박스-앤-위스커 플롯)은 수치형 분포를 요약하는 가장 간결하고 정보량이 풍부한 방법 중 하나입니다. 최솟값, 제1사분위수(Q1), 중앙값, 제3사분위수(Q3), 최댓값이라는 다섯 가지 요약값을 단순한 기하학적 형태로 인코딩합니다. "박스"는 사분위 범위(IQR, Q1에서 Q3까지)에 걸쳐 있으며 데이터의 중간 50%를 포함하고, 박스 내부의 선은 중앙값을 나타냅니다. "위스커"는 박스에서 IQR의 1.5배 이내에 있는 가장 극단적인 데이터 포인트까지 뻗어 있으며, 위스커를 벗어난 개별 포인트는 이상값으로 표시됩니다.

The box plot (or box-and-whisker plot) is one of the most compact and informative ways to summarize a numerical distribution. It encodes the five-number summary -- minimum, first quartile (Q1), median, third quartile (Q3), and maximum -- into a simple geometric form. The "box" spans the interquartile range (IQR, from Q1 to Q3), containing the middle 50% of the data, while a line inside the box marks the median. "Whiskers" extend from the box to the most extreme data points within 1.5 times the IQR, and individual points beyond the whiskers are plotted as outliers.

박스 플롯은 여러 범주에 걸친 분포를 나란히 비교할 때 특히 강력합니다. 각 박스가 차지하는 가로 공간이 최소한이기 때문에 수십 개의 그룹을 동시에 표시할 수 있습니다 — 히스토그램이나 밀도 플롯이라면 압도적으로 복잡했을 상황입니다. 표준화된 구조 덕분에 훈련된 독자는 중심, 퍼짐 정도, (박스 내 중앙값 위치로 알 수 있는) 왜도, 이상값의 존재 여부를 빠르게 파악할 수 있습니다.

Box plots are especially powerful when used side by side to compare distributions across categories. Because each box occupies minimal horizontal space, dozens of groups can be displayed simultaneously -- something that would be overwhelming with histograms or density plots. The standardized anatomy also makes it easy for trained readers to quickly assess center, spread, skewness (from median position within the box), and the presence of outliers.

하지만 박스 플롯은 박스 내부의 분포 형태를 감춥니다. 사분위수가 일치한다면 이봉 분포와 균일 분포가 동일한 박스 플롯을 만들어낼 수 있습니다. 이 때문에 박스 플롯은 기저 데이터의 밀도를 드러내기 위해 지터링된 점, 스트립 플롯, 또는 바이올린 플롯과 함께 사용되는 경우가 많습니다.

However, box plots hide the shape of the distribution within the box. A bimodal distribution and a uniform distribution can produce identical box plots if their quartiles match. For this reason, box plots are often paired with jittered points, strip plots, or violin plots to reveal the underlying data density.

Box Plot — interactive example

언제 사용하나 / When to Use

  • 여러 범주에 걸친 연속형 변수의 분포 비교
  • Comparing distributions of a continuous variable across multiple categories
  • 데이터셋에서 이상값을 빠르게 식별
  • Identifying outliers in a dataset quickly
  • 개별 포인트를 표시하면 시각적으로 복잡해지는 대규모 데이터셋 요약
  • Summarizing large datasets where individual points would create visual clutter
  • 분포의 대칭성과 왜도 평가
  • Assessing symmetry and skewness of distributions
  • 좁은 공간에서 퍼짐과 중심 경향 표시
  • Showing the spread and central tendency in a compact space

이럴 땐 피하세요 / When NOT to Use

  • 대상 독자가 통계적 사분위수에 익숙하지 않을 때 -- 주석을 곁들인 히스토그램 또는 바이올린 플롯을 고려하세요
  • When the audience is unfamiliar with statistical quartiles -- consider a histogram or violin plot with annotations
  • 분포의 형태(이봉형, 다봉형)가 중요할 때 -- 대신 바이올린 플롯이나 밀도 플롯을 사용하세요
  • When the shape of the distribution matters (bimodal, multi-modal) -- use a violin plot or density plot instead
  • 데이터 포인트가 매우 적을 때(10개 미만) -- 원자료 포인트를 스트립 플롯이나 점 도표로 직접 표시하세요
  • When you have very few data points (fewer than 10) -- show the raw points directly as a strip plot or dot plot
  • 분포가 아니라 정확한 값을 비교할 때 -- 오차 막대가 있는 막대 차트를 사용하세요
  • When comparing exact values rather than distributions -- use a bar chart with error bars

구조 / Anatomy

  • 박스: Q1에서 Q3까지(사분위 범위)에 걸친 사각형으로, 값의 중간 50%를 나타냅니다
  • Box: A rectangle spanning from Q1 to Q3 (the interquartile range), representing the middle 50% of values
  • 중앙값 선: 박스 내부에서 중앙값(Q2) 위치에 있는 선(또는 노치)
  • Median line: A line (or notch) within the box at the median (Q2)
  • 위스커: 박스 양 끝에서 IQR의 1.5배 이내의 가장 먼 데이터 포인트까지 뻗은 선
  • Whiskers: Lines extending from each end of the box to the farthest data point within 1.5 * IQR
  • 이상값: 위스커를 벗어나 표시된 개별 포인트
  • Outliers: Individual points plotted beyond the whiskers
  • 범주 축: 서로 다른 그룹이 배열되는 축(가로 또는 세로)
  • Category axis: The axis along which different groups are arranged (horizontal or vertical)
  • 값 축: 측정 변수를 인코딩하는 연속 척도
  • Value axis: The continuous scale encoding the measured variable

변형 / Variations

  • 노치 박스 플롯: 중앙값 주변의 노치가 신뢰구간을 근사합니다; 두 박스의 노치가 겹치지 않으면 중앙값이 유의하게 다르다는 뜻입니다
  • Notched box plot: Notches around the median approximate a confidence interval; if notches of two boxes don't overlap, their medians are significantly different
  • 가변폭 박스 플롯: 박스 너비가 표본 크기에 비례하여 독자가 그룹 크기를 파악할 수 있습니다
  • Variable-width box plot: Box width is proportional to sample size, so readers can assess group sizes
  • 지터 포인트 박스 플롯: 원자료 포인트를 (임의의 가로 지터를 주어) 겹쳐 그려 박스 내부의 밀도를 보여줍니다
  • Box plot with jittered points: Raw data points are overlaid (with random horizontal jitter) to show density within the box
  • 그룹화 / 중첩 박스 플롯: 범주별로 여러 박스 플롯을 배치하여 하위 그룹(예: 연령대 내 성별)을 비교합니다
  • Grouped / nested box plot: Multiple box plots per category for comparing sub-groups (e.g., gender within age groups)
  • 가로형 박스 플롯: 90도 회전한 형태로, 범주 레이블이 길 때 읽기 편할 수 있습니다
  • Horizontal box plot: Rotated 90 degrees, sometimes easier to read when category labels are long

코드 레퍼런스 / Code Reference

// Observable Plot box plot
import * as Plot from "@observablehq/plot";

Plot.plot({
  y: {grid: true, label: "Value"},
  marks: [
    Plot.boxY(data, {x: "category", y: "value", fill: "category"}),
    Plot.ruleY([0])
  ]
})