STAT-02 · STATISTICS

분포·그래프·평균·중앙값Distributions, graphs, means and medians

실제 분포의 빈도와 밀도에서 중심의 정의·가중·순위와 집계의 반례까지From actual frequencies and densities to center definitions, weights, ranks and aggregation counterexamples

실습 6종 · 풀이 포함 연습문제 50개6 labs · 50 exercises with solutions

기초Foundations

1. “평균적인 모습”을 숫자 하나로 다 말할 수 있을까1. Can one number describe a typical distribution?

가정 자료 A=(2,2,2,2,2)와 B=(0,0,0,0,10)의 평균은 모두 2입니다. 하지만 한쪽은 모두 같고 다른 쪽은 한 값에 합계가 몰렸습니다. 평균만 같다고 같은 분포라고 할 수 없습니다. 값들이 어디에 얼마나 있는지부터 그림과 표로 봅니다.

이 장은 빈도표·막대·히스토그램·경험 누적분포를 만들고, 평균·중앙값·최빈값이 어떤 질문에 답하는지 계산합니다. 실제 펭귄 342개 몸무게, 2024년 선택된 16개국 GDPpc,기업 5개 품목 공시를 사용합니다. 가정 변경은 실제 측정과 따로 표시합니다.

Hypothetical datasets A=(2,2,2,2,2) and B=(0,0,0,0,10) share mean two but have very different shapes. One number does not determine a distribution.

Build frequency tables, bars, histograms and empirical CDFs, then compare the questions answered by means, medians and modes. Use actual penguin masses, national GDPpc and company categories, keeping hypothetical changes separate.

기초Foundations

2. 관측분포와 모집단 분포를 구별하기2. Distinguish the observed distribution from a population model

관측분포는 정해진 자료에서 각 값·구간이 차지하는 빈도나 비율입니다. 가용값 n개에 각각 1/n의 무게를 주면 경험분포가 됩니다. 이 분포는 실제 관측 집합을 정확히 요약하지만, 더 큰 모집단 분포와 같다는 추론은 별도입니다.

표본을 고르는 규칙이나 결측 때문에 관측분포가 달라질 수 있습니다. 따라서 첫 장의 관측 단위·포함 조건·유효 분모를 그래프 제목과 함께 유지합니다. “펭귄 몸무게 분포”보다 “이 사본의 몸무게 가용 342기록”이 무엇을 그렸는지 분명합니다.

이후 정규분포 같은 확률 모형과 비교할 수는 있지만, 그림이 종처럼 보인다는 이유만으로 정규성·독립성·대표성이 증명되지는 않습니다. 여기서는 먼저 자료를 압축하는 과정과 압축하며 잃는 정보를 배웁니다.

An observed distribution records frequencies or proportions in a specified dataset. Equal mass 1/n on n available values defines an empirical distribution, not automatic equality with a larger population model.

Retain units, inclusion rules and valid denominators in graph labels. “342 recorded masses in this copy” specifies more than an unqualified penguin-population claim.

A bell-like picture does not prove normality, independence or representativeness. First understand how descriptions compress information.

기초Foundations

3. 빈도 합이 어느 분모와 같아야 하는가3. Which denominator should the frequency total match?

전체 344행 중 몸무게 유효값은 342개입니다. 몸무게 구간 빈도 합은 342여야 합니다. 결측 2개를 범주로 별도 보여 줄 수는 있지만, 그 두 개를 0 g 구간의 측정으로 넣지는 않습니다.

종은 전체 344행에 값이 있고 종별 빈도는 Adelie 152, Gentoo 124, Chinstrap 68입니다. 몸무게가 있는 행으로만 제한하면 종별 151·123·68입니다. 두 표가 다른 이유는 오류가 아니라 포함 집합이 다르기 때문입니다.

∑jnj=nvalid,rj=njnvalid,∑jrj=1\sum_j n_j=n_{\rm valid},\qquad r_j=\frac{n_j}{n_{\rm valid}},\qquad \sum_jr_j=1

이 식은 범주들이 서로 겹치지 않고 모든 가용값을 포함할 때입니다. 복수 응답처럼 한 사람이 여러 범주에 들어가면 빈도 합이 사람 수보다 커질 수 있어 다른 분모·설명이 필요합니다. 빈도·대상 수·응답 건수를 구별합니다.

Body-mass bins must total 342 available values, not 344 rows. Missing values can be reported separately but do not belong in a measured zero-mass bin.

Species counts over all 344 rows are 152 Adelie, 124 Gentoo and 68 Chinstrap; mass-complete counts are 151,123,68. Different inclusion sets explain the difference.

∑jnj=nvalid,rj=njnvalid,∑jrj=1\sum_j n_j=n_{\rm valid},\qquad r_j=\frac{n_j}{n_{\rm valid}},\qquad \sum_jr_j=1

These totals require mutually exclusive, exhaustive categories. Multiple-response questions need a different distinction between people and response counts.

기초Foundations

4. 범주 빈도표와 상대도수: 수와 비율을 함께4. Category frequencies and relative frequencies answer different comparisons

빈도 nⱼ는 해당 범주의 기록 수, 상대도수 rⱼ는 유효 전체에서의 비율입니다. 크기가 다른 두 집단을 비교하면 빈도만으로 많고 적음을 판단하기 어렵습니다. 비율과 각 분모를 함께 제시합니다.

가정 예로 학교 A의 20/100, 학교 B의 15/30을 비교하면 건수는 A가 많지만 비율은 20%와 50%로 B가 큽니다. 어떤 질문이 필요한지에 따라 순서가 달라집니다. 실제 자료가 아닌 비교 원리를 위한 작은 예입니다.

반올림 비율을 더하면 99.9%나 100.1%가 될 수 있습니다. 정확한 원빈도로 계산한 합과 표시 반올림의 차이를 구별합니다. 합이 맞지 않는다고 한 범주를 임의로 바꾸지 않습니다.

Counts show how many records; relative frequencies show shares of a specified valid total. Compare differently sized groups with both proportions and denominators.

In a hypothetical example, 20/100 exceeds 15/30 in count but not proportion: 20% versus 50%. The question determines the comparison.

Rounded percentages can sum to 99.9% or 100.1%. Preserve exact counts rather than silently altering a category to force the display total.

기초Foundations

5. 빈도 실습: 범주값과 결측 상태의 분모5. Frequency lab: distinguish valid categories from missing-status reporting

실제 펭귄의 종·섬·sex·연도와 종별 선택에서 빈도·비율을 확인합니다. sex의 누락을 제외하면 가용 333기록이 분모이고, 누락 상태를 따로 포함해 보고하면 전체 344기록이 분모입니다. 누락 표시를 새로 측정한 sex 범주라고 해석하지 않습니다. 어떤 분모를 쓰는지 화면과 결과 설명에 같이 남깁니다.

명목 범주의 순서는 이름·크기 등 표시 목적에 따라 정할 수 있습니다. 순서형 범주라면 자연 순서를 보존해야 합니다. 숫자 코드를 따라 범주를 이어 그려 연속 수량처럼 보이게 만들지 않습니다.

막대 하나의 비율을 읽을 때 “이 자료의 어떤 행 중 몇 퍼센트인가?”를 말로 설명해 보세요. 세계 전체 생태계의 종 구성이라고 일반화하려면 다른 표집 근거가 필요합니다.

Inspect species, island, sex or year counts under a chosen species selection. Excluding missing sex uses 333 valid records; reporting missing status separately uses 344 total records. A missing-status label is not a newly measured sex category. Keep the denominator visible.

Nominal category order may follow names or counts; ordinal categories retain meaningful order. Do not turn numeric labels into a continuous scale.

Describe each share as a fraction of a specified set of rows. Generalizing to a whole ecosystem requires separate sampling evidence.

기초Foundations

6. 막대 높이·축·면적을 정직하게 읽기6. Read bar heights, axes and areas consistently

같은 폭 막대의 길이로 빈도를 비교한다면 기준선 0부터 그리는 것이 차이를 직접 비교하기 쉽습니다. 축을 잘라 작은 차이를 크게 보이게 하거나, 3D 원근으로 면적을 왜곡하지 않습니다. 축 생략이 필요한 특수 그림은 그 사실과 목적을 명확히 표시합니다.

범주 막대그래프의 가로축 간격은 숫자의 거리와 무관할 수 있습니다. 반면 히스토그램의 가로축은 몸무게 같은 실제 수량 구간입니다. 그림이 모두 사각형이라는 이유만으로 같은 원리로 읽으면 안 됩니다.

파이 차트는 전체를 분할하는 비율에 적합할 수 있지만, 비슷한 여러 각도를 정밀하게 비교하기는 어렵습니다. 수·분모·단위가 함께 있는 표를 남기면 모바일에서도 그림만으로 잃은 정보를 확인할 수 있습니다.

When bar lengths encode counts, start from a clear zero baseline. Truncated axes and 3 D perspective can exaggerate differences; label any deliberate special-axis choice.

Category-bar spacing need not encode numerical distance; histogram widths do. Similar rectangles do not imply identical interpretation.

Keep a numeric table with counts, denominators and units so the graph remains checkable on small screens.

기초Foundations

7. 점도표와 줄기잎: 작은 자료에서는 개별값을 남기기7. Dot plots and stem-and-leaf displays preserve individual values

작은 자료는 모든 점을 가로축에 놓고 겹치는 값만 쌓으면 정확한 값·동률·틈을 볼 수 있습니다. 실제 몸무게가 같은 기록이 여러 개라면 점을 겹치거나 쌓되 한 점이 어떤 기록인지 연결할 수 있습니다.

줄기잎 그림은 자릿수 일부를 줄기, 나머지를 잎으로 써서 순서를 유지합니다. 4|2가 4.2 kg인지 4200 g인지 반드시 키를 씁니다. 측정 단위를 바꾸면 그림의 자릿수 선택도 바뀌지만 물리량이 바뀌지는 않습니다.

자료가 많으면 개별점은 겹쳐 보일 수 있습니다. 지터를 넣었다면 실제 가로값을 바꾼 새 측정이 아니라 표시용 이동임을 알려야 합니다. 요약 히스토그램과 원자료 표를 함께 쓰면 가독성과 검산을 연결할 수 있습니다.

For small datasets, stack equal-valued dots to preserve exact observations, ties and gaps. Link plotted points to their records where practical.

A stem-and-leaf display also retains order, but a key must specify whether 4|2 means 4.2 kg or 4200 g.

Display jitter is a visual displacement, not a new measurement. With many records, combine readable summaries with a checkable source table.

기초Foundations

8. 히스토그램 구간은 겹치지 않게 정의하기8. Define histogram bins without overlaps or omissions

몸무게를 500 g 구간으로 나누면 [2500,3000),[3000,3500),…처럼 왼쪽 포함·오른쪽 제외로 정의할 수 있습니다. 마지막 [6000,6500]만 오른끝도 포함하면 전체 범위의 끝값까지 한 번 셉니다. 경계 3000은 둘째 구간에만 들어갑니다.

nj=#{i:bj≤xi<bj+1},final bin includes its right endpointn_j=\#\{i:b_j\le x_i<b_{j+1}\},\qquad \text{final bin includes its right endpoint}

모든 값이 포함된 경우 구간 빈도 합은 유효값 n과 같아야 합니다. 표시 범위를 줄였다면 바깥값 수를 따로 알립니다. 축 밖으로 사라진 값이 결측이나 0이 되는 것은 아닙니다.

경계 포함 관례는 소프트웨어마다 다를 수 있으므로 명시합니다. 경계값을 갖는 실제 관측은 구간을 어느 쪽에 넣느냐에 따라 막대 빈도가 달라집니다. 같은 그림 재현에는 경계·폭·시작점이 모두 필요합니다.

Use 500 g bins [2500,3000),[3000,3500),…with left-closed, right-open intervals, and close the final right endpoint. A boundary value 3000 enters only the second bin.

nj=#{i:bj≤xi<bj+1},final bin includes its right endpointn_j=\#\{i:b_j\le x_i<b_{j+1}\},\qquad \text{final bin includes its right endpoint}

Counts sum to n only when bins cover every valid value. Report outside-range counts when cropping a plot.

Boundary conventions differ across software. Reproducibility needs edges, widths, origin and inclusion rules.

기초Foundations

9. 실제 히스토그램 실습: 같은 342값을 다른 구간으로9. Histogram lab: bin the same 342 actual masses in different ways

기본 500 g 구간의 실제 빈도는 순서대로 9,62,94,59,51,34,29,4이며 합은 342입니다. 구간폭이나 시작점을 바꾸면 그림은 달라져도 원측정값은 같습니다. 몇 개 막대가 생겼다는 이유만으로 새로운 생물학적 집단을 확정하지 않습니다.

수량축의 단위를 g에서 kg로 바꾸면 경계도 함께 나눕니다. 빈도는 유지되지만 밀도 높이의 수치는 단위 변환에 따라 달라집니다. 다음 절에서 왜 면적이 비율이고 높이만은 비율이 아닌지 계산합니다.

좁은 모바일 화면에서는 모든 막대 위 긴 소수 라벨을 겹쳐 넣기보다 선택 값·축 단위·정확한 표를 함께 봅니다. 그림의 색과 모양뿐 아니라 빈도 합과 구간 정의로 검산하세요.

The eight default 500 g-bin counts are 9,62,94,59,51,34,29,4, totaling 342. Changing width or origin changes the picture without changing observations.

Converting grams to kilograms also converts edges. Counts stay fixed, but density heights change with units; areas represent proportions.

Use readable labels, selected values and an exact table on mobile. Validate totals and bin rules rather than relying only on color or shape.

학부 연결 · 선택Undergraduate bridge · optional

10. 빈도·상대도수·밀도 높이의 세 가지 뜻10. Count, relative-frequency and density heights encode different quantities

구간 빈도 nⱼ,상대도수 nⱼ/n,밀도 높이 nⱼ/(n·구간폭)을 구별합니다. 밀도 히스토그램에서는 높이×폭이 그 구간의 상대도수이므로 전체 면적이 1입니다. 밀도 높이는 g⁻¹ 같은 역단위를 갖고 1보다 클 수도 있습니다.

hj=njn(bj+1−bj),hj(bj+1−bj)=njn,∑jhj(bj+1−bj)=1h_j=\frac{n_j}{n(b_{j+1}-b_j)},\qquad h_j(b_{j+1}-b_j)=\frac{n_j}{n},\qquad \sum_jh_j(b_{j+1}-b_j)=1

가정 예로 [0,1),[1,3]의 빈도가 각 10이면 비율은 모두 1/2입니다. 폭은 1과 2이므로 밀도 높이는 1/2와 1/4입니다. 서로 다른 폭인데 같은 비율 높이 1/2로 그리면 면적은 두 번째가 두 배가 되어 잘못 읽힐 수 있습니다.

이는 경험 자료를 구간 안에 균일하게 펼쳐 표현한 요약입니다. 실제 모집단 밀도가 각 구간에서 정확히 상수라는 주장이 아닙니다. 확률질량·밀도·누적분포의 구별은 6장에서 다시 배웁니다.

Distinguish counts, relative counts and density heights. In a density histogram, height times width equals the bin proportion, and total area is one. Heights have inverse-variable units and can exceed one.

hj=njn(bj+1−bj),hj(bj+1−bj)=njn,∑jhj(bj+1−bj)=1h_j=\frac{n_j}{n(b_{j+1}-b_j)},\qquad h_j(b_{j+1}-b_j)=\frac{n_j}{n},\qquad \sum_jh_j(b_{j+1}-b_j)=1

For hypothetical bins[0,1),[1,3] with 10 observations each, proportions are½,½ but density heights½,¼. Equal relative heights over unequal widths would misrepresent area.

This is a binned description, not a claim that the population density is exactly constant within each bin.

기초Foundations

11. 구간 선택은 모양을 바꾸며 데이터의 참값을 바꾸지 않는다11. Bin choices change displayed shape rather than the observations

구간이 너무 넓으면 서로 떨어진 값들이 한 막대에 합쳐지고, 너무 좁으면 적은 표본의 우연한 틈이 과장될 수 있습니다. 여러 합리적 폭·시작점을 비교하고 공통으로 보이는 특징과 선택에 민감한 특징을 구별합니다.

표본 수에 따라 자동 폭을 정하는 규칙도 있지만 모든 자료의 정답은 아닙니다. 이산 격자·동률·극단값·혼합집단과 분석 목적이 영향을 줍니다. 자동 구간을 썼다면 규칙과 실제 경계를 기록합니다.

정확한 경험분포를 남기고 싶다면 다음의 경험 CDF를 함께 보세요. CDF는 구간 선택 없이 각 관측을 누적합니다. 그림 방식마다 답하기 쉬운 질문과 숨기는 정보가 다릅니다.

Wide bins merge separated values; very narrow bins can emphasize accidental gaps. Compare reasonable widths and origins, distinguishing persistent features from display-sensitive ones.

Automatic rules are not universal truths. Ties, measurement grids, outliers, mixtures and purpose matter; record the rule and actual edges.

An empirical CDF retains the exact cumulative distribution without bin choices. Different displays emphasize different questions.

기초Foundations

12. 경험 누적분포: 문턱 이하인 기록의 비율12. The empirical CDF is the proportion at or below a threshold

유효값 n≥1개에 대해 Fₙ(t)=문턱 t 이하인 값 수/n으로 정의합니다. t가 커질수록 비율은 감소하지 않습니다. 최솟값보다 아래에서는 0, 최댓값 이상에서는 1입니다. 동률이 k개이면 그 값에서 k/n만큼 한 번에 올라갑니다.

Fn(t)=1n∑i=1n1{xi≤t}F_n(t)=\frac1n\sum_{i=1}^n1_{\{x_i\le t\}}

가정 자료 (1,2,2,5)에서 Fₙ(1)=1/4, Fₙ(2)=3/4, Fₙ(4)=3/4, Fₙ(5)=1입니다. 2 바로 아래에서는 1/4이고 2에서는 3/4이므로 뛰는 경계의 점을 정확히 표시합니다.

≤로 정의한 CDF는 오른쪽 연속 계단입니다. 빈 구간을 대각선으로 이어 관측되지 않은 값에 임의의 질량을 퍼뜨리지 않습니다. 표본 내 비율을 미래 모집단 확률과 같다고 단정하지도 않습니다.

For n≥1, define Fₙ(t) as the fraction of values at or below t. It is nondecreasing, zero below the minimum and one at or above the maximum. A tie of k values creates a jump k/n.

Fn(t)=1n∑i=1n1{xi≤t}F_n(t)=\frac1n\sum_{i=1}^n1_{\{x_i\le t\}}

For(1,2,2,5), the CDF at 1,2,4,5 is¼,¾,¾,1. Just below 2 it is¼, and at 2 it is¾.

The≤definition is right-continuous. Draw steps rather than diagonal interpolation that spreads empirical mass across unobserved values.

학부 연결 · 선택Undergraduate bridge · optional

13. 누적분포 실습: 문턱 질문과 순서 질문을 함께13. CDF lab: connect threshold questions with ordered observations

실제 자료에서 문턱 t를 선택하고 그 이하인 기록 수와 비율을 확인합니다. 같은 그림에서 분위수 확률 p를 정하면 누적비율이 처음 p 이상이 되는 관측값을 찾을 수 있습니다. 같은 높이에 여러 값이 있으면 점프와 동률을 같이 읽습니다.

여기 역경험 CDF는 0<p≤1에서 qₚ=x(⌈np⌉)를 사용합니다. p=0에는 소프트웨어 표시 관례로 최솟값을 따로 둡니다. 일반식의 inf{t:Fₙ(t)≥0}는 모든 실수를 허용해 −∞가 되므로 같은 식으로 대입하지 않습니다.

짝수 표본의 관습적인 중앙값과 q₀.₅는 다를 수 있습니다. 두 값을 이름을 붙여 구별하고, 다음 절에서 그 차이를 작은 자료로 직접 확인합니다.

빈 선택 집합은 빈도 수 0을 가질 수 있지만 CDF·분위수·평균·중앙값은 정의되지 않습니다. 빈 상태를 표시하고 0으로 나누거나 중심을 임의로 0으로 채우지 않습니다.

Select a threshold in actual data and inspect the count and share at or below it. A probability p also locates the first ordered observation where cumulative mass reaches p.

Use inverse-empirical-CDF quantiles qₚ=x_(ceil(np)) for 0< p≤1. At p=0, set the sample minimum by a separate display convention; the unrestricted infimum formula at zero would instead be−∞.

For even samples, the conventional averaged-center median can differ from q₀.₅. Label both before comparing them.

An empty selection can have zero counts, but its CDF, quantiles, mean and median are undefined. Show the empty state rather than dividing by zero or inventing a zero center.

학부 연결 · 선택Undergraduate bridge · optional

14. 분위수에는 여러 계산 관례가 있다14. Sample quantiles have multiple calculation conventions

정렬값을 x(1)≤…≤x(n)이라 씁니다. 역경험 CDF 관례는 np를 올림한 위치를 고릅니다. 반면 관습적인 표본 중앙값은 n이 홀수면 가운데, 짝수면 두 가운데 값의 평균입니다. 두 정의 모두 이름과 목적을 밝히면 일관되게 쓸 수 있습니다.

가정 자료 (1,2,10,20)에서 p=0.5의 역CDF 값은 두 번째 값 2입니다. 두 가운데 평균 중앙값은 (2+10)/2=6입니다. “소프트웨어가 틀렸다”기 전에 분위수 알고리즘과 동률·경계 관례를 확인합니다.

R의 공식 문서는 여러 quantile type을 구별하며, 일반 기본값 type 7은 인접 정렬값 사이를 보간합니다. 이 실습은 수학적으로 type 1에 해당하는 역경험 CDF를 명시적으로 사용합니다. 최신 R의 type 1에는 경계 반올림을 위한 fuzz 설정도 있으므로, 정확한 입력 십진분수로 순위를 구한 정의와 부동소수점 구현을 구별합니다. 구현 비교에는 버전과 type·fuzz를 명시합니다.

Write ordered values x_(1)≤…≤x_(n). The inverse empirical CDF selects index ceil(np). The conventional sample median takes the middle value for odd n and averages the two middle values for even n.

For(1,2,10,20), the inverse-CDF 0.5 quantile is 2 while the averaged-center median is 6. Check algorithm and boundary conventions before calling software wrong.

Official R documentation distinguishes multiple quantile types. Its usual default type 7 interpolates; this lab uses the mathematical inverse-ECDF type 1. Recent R also has a fuzz setting for type 1 boundary rounding. Distinguish exact decimal-fraction ranks from floating-point implementation, and record version, type and fuzz when comparing software.

기초Foundations

15. 중앙값의 위치와 값은 다른 숫자15. A median position is not the median value

홀수 n=2m+1이면 m+1번째 값, 짝수 n=2m이면 m번째와 m+1번째의 평균을 이 장의 표본 중앙값으로 씁니다. 위치 (n+1)/2가 171.5라고 해서 몸무게가 171.5 g인 것은 아닙니다. 해당 위치의 두 실제 값을 찾아야 합니다.

x~={x(m+1)n=2m+1(x(m)+x(m+1))/2n=2m\widetilde x=\begin{cases}x_{(m+1)}&n=2m+1\\\bigl(x_{(m)}+x_{(m+1)}\bigr)/2&n=2m\end{cases}

실제 펭귄 n=342에서는 정렬 위치 171·172를 확인합니다. 둘 다 4050 g이므로 중앙값은 4050 g입니다. 선택된 국가 n=16에서는 8·9번째 값의 평균을 사용합니다. 동률이 있으면 중앙값과 같은 값이 절반보다 많을 수도 있습니다.

“절반보다 큰 값, 절반보다 작은 값”을 정확히 동률 없이만 해석하면 틀립니다. 중앙값은 적어도 절반이 그 이하이고 적어도 절반이 그 이상이 되는 위치라는 설명이 동률을 포함합니다.

For n=2 m+1 use x_(m+1); for n=2 m average x_(m), x_(m+1). A position such as 171.5 is not a mass value; look up the two observations.

x~={x(m+1)n=2m+1(x(m)+x(m+1))/2n=2m\widetilde x=\begin{cases}x_{(m+1)}&n=2m+1\\\bigl(x_{(m)}+x_{(m+1)}\bigr)/2&n=2m\end{cases}

Actual 342 penguin masses have 4050 g in positions 171 and 172. Sixteen country values use positions 8 and 9.

With ties, more than half can equal the median. Say at least half are at or below and at least half at or above, rather than demanding exact strict halves.

학부 연결 · 선택Undergraduate bridge · optional

16. 중앙값은 절댓값 거리 합을 최소화한다16. Medians minimize the sum of absolute deviations

값 c로 모든 관측을 대표할 때 거리 |xᵢ−c|의 합을 작게 만들고 싶다고 합시다. 작은 값과 큰 값을 짝지으면 |a−c|+|b−c|≥b−a이고 a≤c≤b일 때 등호입니다. 정렬 양끝부터 짝을 지어 모두 더합니다.

argmin⁡c∈R∑i=1n∣xi−c∣={{x(m+1)}n=2m+1[x(m),x(m+1)]n=2m\operatorname*{argmin}_{c\in\mathbb R}\sum_{i=1}^n|x_i-c|=\begin{cases}\{x_{(m+1)}\}&n=2m+1\\ {[x_{(m)},x_{(m+1)}]}&n=2m\end{cases}

홀수면 마지막 가운데 한 값이 남아 그 값에서만 최소입니다. 짝수면 두 가운데 값 사이의 모든 c가 각 짝에서 등호를 만족하여 모두 최소입니다. 관습적 중앙값은 그 최소 구간의 중점을 대표로 고른 것입니다.

(1,2,10,20)에서는 c=2와 c=6과 c=10이 모두 절댓값 합 27을 줍니다. 평균 8.25와 절대거리 목적의 답은 다른 질문입니다. 하나의 “유일한 중심”이 자연법칙으로 정해지는 것은 아닙니다.

To minimize total absolute distance, pair the smallest with largest values. For a≤b,|a−c|+|b−c|≥b−a, with equality when c lies between them.

argmin⁡c∈R∑i=1n∣xi−c∣={{x(m+1)}n=2m+1[x(m),x(m+1)]n=2m\operatorname*{argmin}_{c\in\mathbb R}\sum_{i=1}^n|x_i-c|=\begin{cases}\{x_{(m+1)}\}&n=2m+1\\ {[x_{(m)},x_{(m+1)}]}&n=2m\end{cases}

An odd sample leaves one center and a unique minimizer. An even sample has the whole middle interval as minimizers; the conventional median selects its midpoint.

For(1,2,10,20), c=2,6,10 all yield absolute sum 27. The mean 8.25 answers a different loss question.

기초Foundations

17. 산술평균은 총량을 같은 크기로 나눈 값17. The arithmetic mean redistributes the same total equally

n≥1개의 수량값 합을 n으로 나눈 산술평균을 x̄라 씁니다. 모든 관측을 x̄로 바꾼다고 생각하면 총합이 그대로입니다. 예를 들어 실제 몸무게 총량 1437000 g를 342기록에 똑같이 나누면 x̄≈4201.754386 g입니다.

xˉ=1n∑i=1nxi,∑i=1n(xi−xˉ)=0,min⁡ixi≤xˉ≤max⁡ixi\bar x=\frac1n\sum_{i=1}^nx_i,\qquad \sum_{i=1}^n(x_i-\bar x)=0,\qquad \min_i x_i\le\bar x\le\max_i x_i

평균에서의 편차 합이 0이라는 식은 정의를 대입하면 바로 나옵니다. 음의 편차와 양의 편차가 합계에서 균형을 이룬다는 뜻입니다. 가장 작거나 큰 값 밖에 평균이 나왔다면 분모·단위·가중치·결측을 먼저 점검합니다.

관측 합이 경제·물리적으로 유의미한 양인지도 확인합니다. 명목 범주 코드의 합을 똑같이 나눠도 의미 있는 중심은 생기지 않습니다. 계산 가능한 숫자와 질문에 맞는 수량을 구별합니다.

The arithmetic mean divides a quantitative total equally among n≥1 observations. Actual total penguin mass 1437000 g divided among 342 recorded values gives about 4201.754386 g.

xˉ=1n∑i=1nxi,∑i=1n(xi−xˉ)=0,min⁡ixi≤xˉ≤max⁡ixi\bar x=\frac1n\sum_{i=1}^nx_i,\qquad \sum_{i=1}^n(x_i-\bar x)=0,\qquad \min_i x_i\le\bar x\le\max_i x_i

Deviations sum to zero by substitution. The mean lies within the observed range; otherwise audit units, weights, denominators and missing values.

An arithmetic total of category codes does not create a meaningful scientific center. Check the measurement interpretation.

학부 연결 · 선택Undergraduate bridge · optional

18. 평균은 제곱거리 합을 유일하게 최소화한다18. The mean uniquely minimizes squared deviations

n≥1이고 모든 xᵢ가 유한하다고 합시다. 임의 c에 대해 xᵢ−c=(xᵢ−x̄)+(x̄−c)를 제곱해 더하면 교차항은 편차 합 0 때문에 사라집니다. 미분 없이도 최소를 증명할 수 있습니다.

∑i=1n(xi−c)2=∑i=1n(xi−xˉ)2+n(c−xˉ)2\sum_{i=1}^n(x_i-c)^2=\sum_{i=1}^n(x_i-\bar x)^2+n(c-\bar x)^2

마지막 항은 c=x̄일 때만 0이므로 평균이 유일한 최소입니다. 수리기초 15장 최소제곱의 가장 단순한 상수 모형을 통계 자료의 중심에서 다시 본 것입니다. 이것이 평균이 모든 질문에 최선이라는 뜻은 아니고 제곱손실을 선택했을 때의 성질입니다.

절댓값 거리와 제곱거리는 큰 편차를 다르게 벌합니다. 제곱은 크기가 두 배면 네 배 비용이 되어 큰 값의 영향이 커집니다. 어떤 오차를 줄일지에 따라 평균·중앙값 선택의 이유를 설명하세요.

For n≥1 finite values, expand xᵢ−c=(xᵢ−x̄)+(x̄−c). The cross term vanishes because deviations sum to zero.

∑i=1n(xi−c)2=∑i=1n(xi−xˉ)2+n(c−xˉ)2\sum_{i=1}^n(x_i-c)^2=\sum_{i=1}^n(x_i-\bar x)^2+n(c-\bar x)^2

The final term vanishes only at the mean, proving unique squared-loss optimality and revisiting the constant-model case from Mathematical Foundations Chapter 15. This does not make the mean best for every purpose.

Squared distance penalizes doubled deviations fourfold, unlike absolute distance. Explain which loss corresponds to the question.

기초Foundations

19. 최빈값·히스토그램 봉우리·모집단 최빈점은 다르다19. Sample modes, histogram peaks and population modes are distinct

표본 최빈값은 가장 많이 반복된 값입니다. 실제 펭귄 몸무게에서는 3800 g가 12번으로 가장 많이 기록됐습니다. 동률 최고 빈도가 여러 값에 있으면 최빈값도 여러 개입니다. 모든 값이 한 번이면 특별히 두드러진 반복 최빈값이 없다고 설명할 수 있습니다.

히스토그램 최고 막대는 구간의 빈도 또는 밀도 봉우리입니다. 가장 높은 구간의 중점이 원자료 최빈값과 같을 필요는 없습니다. 구간폭·시작점이 바뀌면 봉우리 구간도 바뀔 수 있습니다.

연속 모집단의 밀도 최댓점은 또 다른 모형 개념입니다. 같은 정확값이 반복되지 않아도 연속 밀도에는 최빈점이 있을 수 있습니다. 기록 해상도와 통계적 평활 선택을 구별하고 표본 최빈값을 곧바로 자연의 유일한 대표값이라 부르지 않습니다.

A sample mode is a most frequent recorded value. Actual penguin mass 3800 g occurs 12 times. Tied maximum frequencies create multiple modes; all-unique data have no distinctive repeated-value mode.

A histogram peak is a bin property whose midpoint need not equal the raw-data mode. It can change with bin choices.

A continuous population-density mode is a separate modeling concept. Keep exact-value frequencies, measurement resolution, bins and density models distinct.

기초Foundations

20. 중심 실습: 실제 한 기록의 가정 변경을 따로 표시20. Center lab: label a hypothetical change to one actual record

실제 몸무게 자료에서 기록 하나를 선택하고 가정한 대체값으로 바꾼 시나리오를 비교합니다. 원측정값·가정값·평균·중앙값·최빈값을 따로 봅니다. 바뀐 값은 새 현장 측정이 아니며 원자료를 덮어쓰지 않습니다.

한 값 xⱼ를 z로 바꾸면 평균 변화는 (z−xⱼ)/n입니다. 중앙값 변화는 그 값이 정렬에서 어느 위치로 이동하는지에 달려 있습니다. 극단값만 더 멀리 옮기면 중앙값이 그대로일 수 있지만, 중앙 근처의 순서를 바꾸면 중앙값도 달라집니다.

평균과 중앙값 중 어느 하나를 지우기보다 두 요약과 분포 그림을 같이 보고 질문에 맞는 이유를 쓰세요. 가정 변경 실습은 민감도를 보여 주며 실제 이상치 삭제를 자동 승인하는 규칙이 아닙니다.

Select one actual mass record and compare an explicitly hypothetical replacement. Retain the original value and distinguish the scenario from new field measurement.

Replacing xⱼ by z changes the mean by (z−xⱼ)/n. Median changes depend on order: an extreme can move farther without changing it, but changing central ranks can move it.

Compare both summaries with the distribution and explain the relevant purpose. Sensitivity exploration is not an automatic outlier-deletion rule.

기초Foundations

21. 중앙값은 덜 민감할 수 있지만 변하지 않는 마법은 아니다21. The median can resist extremes without being immune to changes

가정 자료 (1,2,3,4,10)에서 10만 1000으로 바꾸면 중앙값은 3으로 같고 평균은 4에서 202로 바뀝니다. 같은 표본 수에서 한 값의 크기를 임의로 키우면 평균을 임의로 크게 만들 수 있습니다.

반면 (1,2,3)에서 가운데 2를 100으로 바꾸면 중앙값은 3이 됩니다. “이상값은 중앙값에 아무 영향도 없다”는 문장은 너무 강합니다. 순서와 교체 비율에 따라 영향이 달라집니다.

강건성은 특정 오염·손실·목표에 대한 성질로 정의해야 합니다. 실제값을 무시할 권한이 아닙니다. 소득 총량을 같은 사람 수로 나누는 질문에서는 평균 자체가 목적이고, 전형적인 순위 위치가 목적이면 중앙값이 유용할 수 있습니다.

Changing 10 to 1000 in (1,2,3,4,10) keeps median 3 but moves mean 4 to 202. A single unbounded replacement can make the mean unbounded.

Yet changing the middle 2 to 100 in (1,2,3) moves the median to 3. “Outliers never affect the median” is too strong.

Robustness concerns a specified contamination and target, not permission to ignore observations. Mean totals and typical rank positions answer different questions.

기초Foundations

22. 비대칭·긴 꼬리·여러 봉우리를 먼저 그림으로22. Inspect asymmetry, tails and multiple peaks before naming a center

오른쪽에 드문 큰 값이 길게 이어지면 평균이 중앙값보다 큰 모습을 자주 봅니다. 그러나 평균·중앙값·최빈값의 일정 순서가 모든 비대칭 자료의 정리는 아닙니다. 동률·이산성·여러 집단의 혼합에 따라 달라집니다.

실제 펭귄은 여러 종이 섞여 있습니다. 전체 히스토그램의 어깨·봉우리를 단일 종의 몸무게 모형으로 읽지 말고 종별 포함 수와 분포를 비교합니다. 더 높은 평균이 어떤 종 구성 때문인지와 각 종 안의 차이는 다른 질문입니다.

분포를 보고 왜도라는 말을 쓸 때 어떤 정의인지 밝힙니다. 세 번째 모멘트 기반 왜도 계수는 다음 장의 변동·모멘트와 연결합니다. 여기서는 “평균이 더 큼”만으로 정해진 확률모형이나 인과 이야기를 확정하지 않습니다.

A long right tail often pulls a mean above a median, but no universal ordering of mean, median and mode characterizes every asymmetric dataset.

Actual penguins mix species. Compare subgroup distributions before interpreting pooled peaks as one-species biology.

Specify any formal skewness definition; moment-based coefficients connect to the next chapter. A larger mean alone does not identify a population model or causal story.

기초Foundations

23. 평균과 중앙값이 같아도 대칭이라는 증명은 아니다23. Equal mean and median do not prove symmetry

가정 자료 (0,1,2,2,5)는 평균 2, 중앙값 2입니다. 그러나 2를 중심으로 왼쪽 편차는 −2,−1, 오른쪽에는 +3이 있어 거울대칭이 아닙니다. 중심 숫자 두 개가 같다는 조건만으로 모든 값의 배치를 복원할 수 없습니다.

유한 자료가 어떤 c를 중심으로 정확히 거울대칭이면 평균과 관습적 중앙값은 c입니다. 반대 방향은 위 반례처럼 성립하지 않습니다. 무한 확률분포의 평균을 말할 때는 존재 조건도 필요하여, 대칭이라고 언제나 유한 평균이 있는 것은 아닙니다.

따라서 그림·원값·여러 요약을 함께 읽습니다. 한 숫자로 증명할 수 없는 성질을 숫자 하나에서 단정하지 않는 것이 통계적 요약의 핵심입니다.

The hypothetical data(0,1,2,2,5) have mean and median 2 but are not mirror-symmetric about 2. The deviations do not pair.

Exact symmetry of finite data implies the center equals both mean and conventional median; the converse fails. For infinite probability models, mean existence is an additional condition.

Read values, graphs and summaries together rather than inferring an entire distribution from one number.

학부 연결 · 선택Undergraduate bridge · optional

24. 평균의 선형성: 같은 관측을 같은 방식으로 변환하기24. Mean linearity requires consistent transformations and matched observations

모든 값에 yᵢ=axᵢ+b를 적용하면 y평균=a·x평균+b입니다. 합을 분배하면 직접 증명됩니다. 같은 n의 짝지은 관측에서 평균(y−x)=평균(y)−평균(x)도 성립합니다.

ax+b‾=axˉ+b,y−x‾=yˉ−xˉfor the same matched records and weights\overline{ax+b}=a\bar x+b,\qquad \overline{y-x}=\bar y-\bar x\quad\text{for the same matched records and weights}

실제 기업 5품목의 평균 매출 변화는 총변화 7750/5=1550 백만 미국 달러입니다. 2024 평균 78207과 2023 평균 76657의 차이도 1550입니다. 같은 품목 집합을 같은 무게로 쓴 덕분입니다.

두 해에 가용 품목이나 가중치가 달라지면 같은 짝지은 변화 공식이라고 부를 수 없습니다. 먼저 공통 키와 포함 집합을 확인합니다. 다음에는 중앙값에 이 선형성을 복사하면 왜 틀리는지 봅니다.

Consistently transforming every value by ax+b transforms the mean by a·mean+b. Matched equal-weight records also give mean(y−x)=mean(y)−mean(x).

ax+b‾=axˉ+b,y−x‾=yˉ−xˉfor the same matched records and weights\overline{ax+b}=a\bar x+b,\qquad \overline{y-x}=\bar y-\bar x\quad\text{for the same matched records and weights}

Actual company-category total change 7750 divided by 5 gives mean change 1550 million US dollars, equal to 78207−76657.

Changing records or weights breaks this matched interpretation. Check common keys before using the identity.

학부 연결 · 선택Undergraduate bridge · optional

25. 비선형 변환 뒤의 중앙값 관례도 확인하기25. Median conventions matter after nonlinear transformations

정렬 순서를 보존하는 엄격 증가 변환은 홀수 표본의 가운데 관측과 역경험 CDF 분위수를 그대로 변환합니다. 하지만 짝수 표본의 두 가운데 평균은 비선형 변환과 교환하지 않을 수 있습니다.

가정 자료 (1,9)의 관습적 중앙값은 5이고 그 제곱근은 √5입니다. 값을 먼저 제곱근으로 바꾸면 (1,3),중앙값은 2여서 √5와 다릅니다. 이 결과는 정렬이 틀려서가 아니라 두 값의 평균과 제곱근이 교환하지 않기 때문입니다.

역CDF p=0.5를 쓰면 원자료에서 1, 변환 후에도 1로 서로 대응합니다. 따라서 “중앙값은 어떤 단조 변환과도 항상 같다”는 문장을 쓰기 전에 중앙값의 정의·짝수 관례를 확인해야 합니다. 선형 양의 단위 변환에서는 두 가운데 평균도 같은 방식으로 변환됩니다.

A strictly increasing transformation preserves order, so it commutes with an odd-sample middle observation and inverse-ECDF quantiles. It need not commute with averaging an even sample’s two central values.

For(1,9), the conventional median is 5, whose square root is√5. Transform first to (1,3), and the median is 2. These differ because averaging and square roots do not commute.

The inverse-CDF 0.5 quantile instead maps 1 to 1. State the convention before claiming transformation equivariance. Positive affine unit changes also preserve the averaged-center rule.

학부 연결 · 선택Undergraduate bridge · optional

26. 가중평균: 비음수 무게와 양의 총합26. Weighted means require nonnegative weights and a positive total

관측마다 무게 wᵢ≥0를 붙이고 총무게 W>0로 나누면 가중평균 Σwᵢxᵢ/W입니다. 무게가 빈도·시간·인구·표집 보정 중 무엇인지 설명합니다. 같은 숫자 열도 무게를 바꾸면 질문이 바뀝니다.

xˉw=∑iwixi∑iwi,wi≥0,∑iwi>0\bar x_w=\frac{\sum_iw_ix_i}{\sum_iw_i},\qquad w_i\ge0,\quad \sum_iw_i>0

비음수 정규화 무게의 합이 1이므로 결과는 양의 무게가 붙은 값의 최솟값과 최댓값 사이입니다. 모든 무게가 0이면 평균은 정의하지 않습니다. 음의 무게가 등장하는 별도 모형을 이 일반 가중평균의 해석과 혼합하지 않습니다.

가중평균도 Σwᵢ(xᵢ−c)²를 최소화하는 c입니다. 무게가 양수인 관측이 하나 이상이면 제곱합 전개에서 W(c−x̄w)²가 남아 유일한 최소를 얻습니다. 이것은 가중 손실을 선택한 성질입니다.

Assign weights wᵢ≥0 and divide by positive total W. Explain whether weights mean frequencies, time, population or sampling adjustment.

xˉw=∑iwixi∑iwi,wi≥0,∑iwi>0\bar x_w=\frac{\sum_iw_ix_i}{\sum_iw_i},\qquad w_i\ge0,\quad \sum_iw_i>0

Nonnegative normalized weights sum to one, so the result lies between positively weighted extremes. All-zero weights give no mean.

Expanding weighted squared deviations leaves W(c−x̄w)², proving the weighted mean uniquely minimizes the chosen squared loss.

기초Foundations

27. 집단 평균의 평균은 집단 크기를 알아야 한다27. Pool group means using their group sizes

서로 겹치지 않는 집단 j의 유효값 수 nⱼ와 평균 mⱼ를 알면 전체 합은 Σnⱼmⱼ이고 전체 평균은 이를 Σnⱼ로 나눕니다. 집단 크기가 같지 않으면 집단 평균을 단순 평균하는 것은 다른 대상입니다.

xˉpooled=∑jnjmj∑jnj\bar x_{\rm pooled}=\frac{\sum_j n_jm_j}{\sum_j n_j}

가정 예로 10명 평균 2와 90명 평균 4를 합치면 전체 평균은 3.8입니다. 두 평균의 단순 평균 3은 집단을 같은 무게로 고르는 질문입니다. 어느 숫자도 맥락 없이 유일하게 옳다고 할 수 없지만 전체 100명의 평균은 3.8입니다.

실제 펭귄 종별 몸무게 평균을 합칠 때는 몸무게 유효 수 151·68·123을 사용합니다. 전체 종 행 수 152·68·124를 섞으면 분모·합계가 다른 집합의 숫자가 됩니다. 중복 집단이면 이 공식으로 전체를 두 번 세지 않도록 재정의해야 합니다.

For disjoint groups, use observed counts nⱼ and means mⱼ to reconstruct totals, then divide by the combined count.

xˉpooled=∑jnjmj∑jnj\bar x_{\rm pooled}=\frac{\sum_j n_jm_j}{\sum_j n_j}

Ten values averaging 2 and ninety averaging 4 pool to 3.8. The unweighted mean of group means 3 instead weights groups equally.

Actual species mass means require valid mass counts 151,68,123, not full-record species counts 152,68,124. Overlapping groups need additional handling to prevent double counting.

기초Foundations

28. 가중 실습: 국가·인구·개체의 서로 다른 평균28. Weight lab: distinguish country, population and recorded-animal averages

실제 2024년 국가 GDPpc에서 국가 균등 평균과 인구 비중 평균을 비교합니다. 또 실제 펭귄 종별 평균을 동일한 종 무게로 평균한 값과 관측 개체 수로 합친 값을 비교합니다. 무엇을 한 번 고르는 평균인지 말로 설명하세요.

국가 균등 평균은 약 31100.238572, 선택된 16개국 인구 비중 평균은 약 15756.274457입니다. 후자는 국가 지표를 인구 무게로 읽는 값이지 개인 실제 소득 분포를 관측한 것이 아닙니다. 두 경우 모두 선택한 국가 집합의 범위를 유지합니다.

종별 평균을 개체 수로 합치면 원래 342개 관측 평균을 회복합니다. 동일 종 무게는 “세 종 중 하나를 균등하게 고른 뒤 그 종의 관측 평균을 읽기”라는 다른 질문입니다. 가중치 선택을 숨기지 않습니다.

Compare actual 2024 uniform-country and population-weighted GDPpc. Then compare equally weighted species means with valid-record-count pooling.

Country values are about 31100.238572 and 15756.274457. The population-weighted national indicator is not a measured individual-income distribution.

Record-count pooling recovers the 342-mass mean. Equal species weighting instead chooses among three species uniformly before reading a species mean. Label the weighting question.

기초Foundations

29. 중앙값의 차이는 개별 변화의 중앙값과 다르다29. A difference of medians need not equal the median of matched changes

실제 기업 5품목의 2023 매출 중앙값은 39845,2024는 37005 백만 미국 달러입니다. 두 중앙값의 차이는 −2840입니다. 그러나 품목별 변화는 (600,627,−1606,−2840,10969)이고 정렬하면 (−2840,−1606,600,627,10969)이므로 변화 중앙값은 +600입니다.

med⁡(R24)−med⁡(R23)=−2840≠600=med⁡(R24−R23)\operatorname{med}(R_{24})-\operatorname{med}(R_{23})=-2840\ne600=\operatorname{med}(R_{24}-R_{23})

각 연도의 가운데 품목 위치와 개별 변화의 가운데 위치가 같은 역할을 하지 않기 때문입니다. 반면 평균 변화 1550은 평균의 차이와 같습니다. 평균의 선형성을 중앙값에 그대로 복사할 수 없습니다.

품목 변화의 질문이면 품목 키를 맞춰 차이를 먼저 만들고 그 분포를 요약하세요. 각 해의 전형적 품목 규모 변화가 질문이면 두 분포의 중앙값을 비교할 수 있습니다. 두 질문의 이름을 구별해야 부호가 반대인 결과를 모순이라고 오해하지 않습니다.

Actual FY2023 and FY2024 category medians are 39845 and 37005 million US dollars, a difference of−2840. Matched changes(600,627,−1606,−2840,10969) instead have median+600.

med⁡(R24)−med⁡(R23)=−2840≠600=med⁡(R24−R23)\operatorname{med}(R_{24})-\operatorname{med}(R_{23})=-2840\ne600=\operatorname{med}(R_{24}-R_{23})

Annual central ranks differ from ranks of matched changes. Mean change 1550 equals the difference of means, but median linearity fails.

For category changes, match keys and summarize differences. For changing typical category levels, compare annual distributions. Name the questions rather than treating opposite signs as inconsistent arithmetic.

학부 연결 · 선택Undergraduate bridge · optional

30. 구간 중점 평균은 원값 평균의 근사30. A midpoint-based grouped mean approximates rather than recovers the raw mean

구간별 빈도만 남으면 각 원값을 정확히 알 수 없습니다. 구간 중점 mⱼ에 모든 값을 놓았다고 가정하면 Σnⱼmⱼ/n으로 평균을 근사할 수 있습니다. 이는 실제 원값 합을 다시 찾은 것이 아닙니다.

xˉmidpoint=∑jnjmjn,∣xˉmidpoint−xˉ∣≤1n∑jnjwj2\bar x_{\rm midpoint}=\frac{\sum_jn_jm_j}{n},\qquad |\bar x_{\rm midpoint}-\bar x|\le\frac1n\sum_j n_j\frac{w_j}{2}

각 값이 해당 구간 안에 있다면 중점 대체 오차는 반폭 wⱼ/2 이하라 삼각부등식으로 표시한 상계를 얻습니다. 실제 펭귄 500 g 구간에서는 상계 250 g이고, 중점 근사 평균 약 4216.374269 g는 원값 평균 약 4201.754386 g보다 약 14.619883 g 큽니다.

표에 요약 구간만 남았으면 이 근사와 가정을 표시합니다. 원자료가 있으면 직접 원값으로 계산합니다. 구간별 평균이 중점이라고 주장하려면 별도 근거가 필요합니다.

When only bin counts remain, replacing values by bin midpoints gives an approximation, not the original total.

xˉmidpoint=∑jnjmjn,∣xˉmidpoint−xˉ∣≤1n∑jnjwj2\bar x_{\rm midpoint}=\frac{\sum_jn_jm_j}{n},\qquad |\bar x_{\rm midpoint}-\bar x|\le\frac1n\sum_j n_j\frac{w_j}{2}

Each within-bin replacement has error at most half its width. For actual 500 g bins, the bound is 250 g. The midpoint mean 4216.374269 g exceeds the raw mean 4201.754386 g by about 14.619883 g.

Label grouped-data approximations and assumptions. If raw values exist, calculate directly rather than assuming each bin’s mean equals its midpoint.

학부 연결 · 선택Undergraduate bridge · optional

31. 성장률의 평균은 복리 질문을 확인해야 한다31. Averaging growth rates requires a compounding question

가정 가격이 100→200→100으로 변하면 연도 변화율은 +100%,−50%입니다. 산술평균은 +25%이지만 처음과 끝 가격은 같습니다. “매년 일정 비율로 복리 변화해 같은 끝값이 되는가”는 산술평균과 다른 질문입니다.

(1+g)T=∏t=1T(1+rt),g=[∏t=1T(1+rt)]1/T−1(1+g)^T=\prod_{t=1}^T(1+r_t),\qquad g=\left[\prod_{t=1}^T(1+r_t)\right]^{1/T}-1

양의 성장배수 1+rₜ>0에서 기하평균을 쓰면 이 예의 g=0입니다. 로그 성장률의 평균을 지수화하는 식과도 연결됩니다. 원자료가 음수·0을 가지거나 기간 길이가 다르면 같은 식의 조건을 다시 확인합니다.

이 장에서 실제 투자 수익을 권고하는 사례가 아니라 평균의 목적을 구별하는 수학 예입니다. 경제 자료의 전년비·연평균·연율화·물가 기준은 경제학·계량 과목의 실제 사례에서 더 자세히 연결합니다.

A hypothetical price 100→200→100 has rates+100%,−50%, whose arithmetic mean is+25%despite no endpoint growth. A constant compounded annual rate answers a different question.

(1+g)T=∏t=1T(1+rt),g=[∏t=1T(1+rt)]1/T−1(1+g)^T=\prod_{t=1}^T(1+r_t),\qquad g=\left[\prod_{t=1}^T(1+r_t)\right]^{1/T}-1

With positive growth factors, the geometric calculation gives g=0. It also connects to exponentiating mean log growth. Check zeros, negative values and unequal durations before applying the formula.

This is a mathematical teaching example, economic time-series interpretation is developed later with actual data.

기초Foundations

32. 연도 흐름과 값의 분포는 다른 그림32. A time path and a value distribution retain different information

연도별 GDP 선그래프는 어떤 값이 언제 나왔는지 보존합니다. 같은 값들을 히스토그램으로 바꾸면 시간 순서는 사라집니다. 시간 순서만 뒤집어도 히스토그램·평균·중앙값은 같지만 상승·하락 이야기는 바뀔 수 있습니다.

품목 비교는 범주 막대, 두 측정 관계는 산점도, 한 변수 분포는 히스토그램·ECDF가 질문에 맞습니다. 그림을 보기 좋게 고르는 일과 필요한 정보를 유지하는 일을 함께 생각합니다.

표본 분포의 모양만으로 시간 의존·변화 원인·구조 단절을 판단하지 않습니다. 다음 장에서는 두 변수의 함께 움직임을 공분산·상관으로 읽고, 이후 계량경제학에서 시계열·패널 구조를 다시 다룹니다.

A GDP time graph preserves when each value occurred. A histogram discards order. Reversing time preserves mean, median and histogram while changing the trend story.

Use category bars for category comparisons, scatterplots for paired variables, and histograms or CDFs for one-variable distributions.

Distribution shape alone does not establish temporal dependence, causes or structural changes. Later chapters restore those questions explicitly.

기초Foundations

33. 실제 국가 사례: 평균보다 큰 중앙값을 정의부터 읽기33. Actual countries: read a median above the mean with its precise target

선택된 2024년 16개국 GDPpc를 동일 국가 무게로 요약하면 평균 약 31100.238572, 중앙값 약 37512.531789입니다. 중앙 두 값은 한국 37048.4264001496과 일본 37976.6371788298입니다. 둘의 평균을 원단위로 계산합니다.

낮은 국가값과 국가 구성 때문에 두 중심이 다르지만, 그 숫자 둘만으로 국가 모집단의 정확한 왜도 모형을 증명하지는 않습니다. 정렬표·ECDF·값 범위를 함께 봅니다. 국가 균등과 인구 가중의 질문도 섞지 않습니다.

단위는 2015년 불변 미국 달러/명입니다. 명목 달러·PPP 지표·개인 소득의 중앙값으로 바꾸어 부르지 않습니다. 국가 지표의 중앙값은 개인 분포의 중앙값과 다른 대상입니다.

For sixteen equally weighted selected countries in 2024, GDPpc mean is about 31100.238572 and median 37512.531789. The central values are Korea 37048.4264001496 and Japan 37976.6371788298.

Inspect the ordered values and CDF rather than inferring a full skewness model from the two centers. Keep uniform-country and population-weighted questions separate.

Units are constant 2015 US dollars per person, not nominal dollars, PPP or personal-income medians.

기초Foundations

34. 실제 펭귄 사례: 세 중심과 구간 근사를 함께34. Actual penguins: compare three centers and the grouped approximation

몸무게 유효 342기록에서 평균 약 4201.754386 g,중앙값 4050 g,최빈값 3800 g입니다. 서로 다른 정의의 결과이며 어느 하나가 나머지의 계산 오류를 뜻하지 않습니다. 전체 세 종 혼합이라는 관측 범위를 유지합니다.

기본 8구간 히스토그램은 원값을 압축한 그림이고 중점 평균 약 4216.374269 g는 별도의 근사입니다. 342개 값을 직접 쓴 평균과 혼동하지 않습니다. 빈도 합·밀도 면적·ECDF 마지막 높이 1로 각각 검산합니다.

종별 관측 수와 평균을 보면 구성 차이를 더 잘 읽을 수 있습니다. 가중 실습의 종별 수는 151 Adelie,68 Chinstrap,123 Gentoo입니다. 성별 정보가 없어도 몸무게가 있는 추가 9기록을 왜 포함했는지 첫 장의 분모 설명과 연결합니다.

The 342 recorded masses have mean about 4201.754386 g, median 4050 g and mode 3800 g. These differ by definition, not arithmetic error, and describe a three-species mixture.

The default histogram compresses values; its midpoint mean 4216.374269 g is an approximation. Validate counts, unit density area and CDF endpoint separately.

Pool species means with 151 Adelie, 68 Chinstrap and 123 Gentoo mass records. Unneeded sex filtering would remove nine otherwise observed masses.

기초Foundations

35. 실제 기업 사례: 총량·평균·중앙값의 서로 다른 변화35. Actual company: totals, means and medians change differently

실제 품목 매출 총합은 383285→391035, 같은 5품목 산술평균은 76657→78207 백만 미국 달러입니다. 평균 변화 +1550은 총변화 +7750을 5로 나눈 값입니다. 두 해에 같은 품목과 무게를 사용했습니다.

반면 연도 중앙값은 39845→37005로 내려갔고, 품목별 변화 중앙값은 +600입니다. Services의 큰 증가와 품목별 순서·규모가 총량·중앙 위치에서 다른 역할을 하기 때문입니다. 중앙값의 비선형성은 실제 숫자로 확인됩니다.

이 자료는 1개 기업의 품목 기록이며 2023·2024 회계연도 길이는 53·52주입니다. 여러 기업의 평균 성장이나 고객 구매 확률을 추정한 것으로 옮겨 쓰지 않습니다. 원공시와 짝지은 변화 표를 함께 남깁니다.

Actual category totals move 383285→391035 and means 76657→78207 million US dollars. The mean change 1550 is total change 7750 divided by the same five categories.

Annual medians fall 39845→37005 while the median matched change is+600. Totals, rank locations and median nonlinearity answer different questions.

One company’s category records across 53- and 52-week years do not estimate a multi-firm growth population or customer purchase probability.

기초Foundations

36. 실제 자료 실습: 원값·구간값·가중값의 차이를 검산36. Actual-data lab: audit raw, binned and weighted summaries

국가·펭귄·기업을 바꾸며 유효 n,정렬 두 중앙값, 원값 합, 평균, 중앙값을 함께 확인합니다. 히스토그램 근사·가정 대체값·실제 기록은 서로 다른 상태로 표시합니다.

국가에서는 국가와 인구 무게를, 펭귄에서는 원값과 중점 근사를, 기업에서는 중앙값 차이와 변화 중앙값을 구별합니다. 단위·분모·순서 관례를 말로 설명하고 수치 표에서 직접 검산하세요.

비어 있는 선택에서는 빈도 수 0을 표시할 수 있지만 평균·중앙값·CDF·분위수를 0이라고 만들어 내지 않습니다. 유효값이 한 개면 그 값이 평균·중앙값·모든 표시 분위수이고 CDF는 그 점에서 0→1로 뜁니다.

Inspect valid n, central order statistics, raw totals, means and medians for each actual dataset. Distinguish binned approximations and hypothetical replacements from observations.

Compare country weights, penguin midpoint approximations and company median-change questions with exact tables and units.

An empty selection has zero counts but undefined centers, CDF and quantiles. A singleton has its one value as every reported center and quantile, with a CDF jumping from zero to one there.

기초Foundations

37. 국가·생물 관측·기업의 상세 케이스 스터디37. Detailed country, animal-measurement and company cases

국가 사례 · 평균 국가와 가운데 국가가 같을까?

2024년의 실제 GDP/명 16개를 고정합니다. 1장처럼 국가-연도를 섞지 않고 같은 연도의 국가 지표를 비교합니다. 각 국가에 같은 무게를 주는 산술평균은 모든 값을 더해16으로 나눕니다. 중앙값은 작은 값부터 정렬한 뒤 가운데 위치를 찾습니다. 질문은 이16개 국가 지표의 분포이며 세계 주민의 개인소득 분포가 아닙니다.

y‾=∑i=116yi16≈31100.238572,y~=y(8)+y(9)2=37512.5317894897\overline y=\frac{\sum_{i=1}^{16}y_i}{16}\approx31100.238572,\qquad\widetilde y=\frac{y_{(8)}+y_{(9)}}2=37512.5317894897

괄호가 붙은 y(8)은 “8번째 해”가 아니라 정렬 뒤8번째 값입니다. 그 위치는 한국37,048.4264001496, 다음은 일본37,976.6371788298입니다. 두 값의 평균이 중앙값입니다. 중앙값은 어느 한 나라의 원수치일 필요가 없습니다.

실제 값을 정렬하고 가운데 두 위치를 확인하기
순위국가 코드실제 GDP/명 (2015 USD/명)중앙 위치
1IND2,366.832891
2VNM4,012.507799
3IDN4,367.947418
4ZAF5,715.475315
5BRA9,566.745187
6MEX10,284.033693
7CHN13,119.107610
8KOR37,048.4264008·9번째
9JPN37,976.6371798·9번째
10FRA39,683.395349
11DEU44,027.763155
12CAN45,061.386459
13GBR47,900.968014
14AUS61,486.381475
15USA66,856.513170
16SGP68,129.696040
먼저 생각한 뒤 풀이 보기: 중앙값37,512.53은 실제 존재하는 “가운데 국가”의 값인가요?

관측수가 짝수16개라 가운데 두 값의 평균을 정의로 사용했습니다. 그 수치를 가진 나라가 표에 없어도 괜찮습니다. 중앙 위치8.5와 중앙값37,512.53도 서로 다른 양입니다. 홀수개라면 가운데 한 순위의 원값을 사용합니다.

먼저 생각한 뒤 풀이 보기: 평균이 중앙값보다 작다고 평균이 계산 오류인가요?

아닙니다. 평균은 모든 값의 크기에 반응하고 중앙값은 주로 정렬의 가운데에 반응합니다. 낮은 GDP/명 국가들과 높은 국가들이 얼마나 떨어져 있는지가 평균에 함께 들어갑니다. 두 숫자만으로 분포 전체의 모양을 확정하지 말고 정렬 그림·최솟값·최댓값도 봅니다. GDP/명 값이 크다는 이유만으로 잘못된 이상치라고 지우지 않습니다.

먼저 생각한 뒤 풀이 보기: 국가 이름 순서로 이어 그리면 시간 추세를 볼 수 있나요?

나라 이름이나 GDP 순위는 시간 축이 아닙니다. 그림의 순서는 값의 크기를 읽기 위한 것입니다. 연간 추세를 보려면 국가를 고정하고 연도를 축으로 써야 합니다. 그래프를 만들 때 가로축이 국가·시간·순위 중 무엇인지 먼저 적습니다.

먼저 생각한 뒤 풀이 보기: 이 평균이 인구 비중 평균과 같을까요?

각 국가의 무게가1/16인 요약입니다. 인구 비중을 쓰면 다른 가중평균이고 다른 질문에 답합니다. 이 국가 지표에 대한 중앙값 역시 주민 개인의 소득 중앙값이 아닙니다. 가중치와 관측 단위를 함께 써야 “평균”의 의미가 분명합니다.

자료: World Bank · NY.GDP.PCAP.KD, 실제2024년 국가 지표 · 원자료·요약 CSV

개체 사례 ·342개 실제 몸무게를 분포로 읽기

Palmer 펭귄344개 관측행에서 몸무게가 있는342개만 이 변수의 요약에 사용합니다. 빈값 두 행은 다운로드 파일에 그대로 남겨 둡니다. 종은 Adélie151개, Chinstrap68개, Gentoo123개의 유효 몸무게입니다. 이 장에서는 성별 값이 필요하지 않으므로 성별 결측을 이유로9개를 추가 제외하지 않습니다.

m‾=1437000342≈4201.754386 g,m~=4050 g,mode⁡(m)=3800 g (12 records)\overline m=\frac{1437000}{342}\approx4201.754386\,{\rm g},\qquad\widetilde m=4050\,{\rm g},\qquad\operatorname{mode}(m)=3800\,{\rm g}\ (12\text{ records})

평균은 몸무게의 합을 나눈 값, 중앙값은 정렬한171·172번째의 평균, 최빈값은 가장 자주 기록된 값입니다. 세 수는 같은 자료를 서로 다른 방식으로 요약합니다.3800 g는12번 보고됐지만 나머지330개가 모두 그 몸무게인 것은 아닙니다. 측정이 어느 단위로 보고되는지도 최빈값에 영향을 줄 수 있습니다.

1. 히스토그램의 구간을 직접 정의하기

500 g 폭의 구간을2500 g부터6500 g까지 정합니다. [2500,3000)은2500을 포함하고3000은 다음 구간에 넣습니다. 마지막 [6000,6500]만 오른쪽을 포함합니다. 원관측 최솟값2700 g와 최댓값6300 g를 모두 포함하고 어떤 값도 두 번 세지 않습니다.

실제 빈도와 종별 구성 · 유효 분모342
구간 (g)전체AdélieChinstrapGentoo
2500~3000 (상한 제외)9720
3000~3500 (상한 제외)6247150
3500~4000 (상한 제외)9458351
4000~4500 (상한 제외)59311315
4500~5000 (상한 제외)518340
5000~5500 (상한 제외)340034
5500~6000 (상한 제외)290029
6000~6500 (상한 포함)4004
먼저 생각한 뒤 풀이 보기: 3000 g 관측은 어느 막대에 들어가나요?

[3000,3500) 구간입니다. 구간 경계와 포함 규칙을 함께 기록했으므로 중복·누락 없이 셀 수 있습니다. 같은 원자료라도 구간 폭·시작점을 바꾸면 보이는 모양은 달라질 수 있습니다. 막대 모양만 보고 종이 하나인지 세 개인지 확정하지 않습니다.

먼저 생각한 뒤 풀이 보기: 정확한 값의 빈도표와 구간 빈도표에서 평균을 구하면 같나요?
m‾=∑vv nv342,m‾midpoint=∑bcb nb342=721000171≈4216.374269 g\overline m=\frac{\sum_v v\,n_v}{342},\qquad\overline m_{\rm midpoint}=\frac{\sum_b c_b\,n_b}{342}=\frac{721000}{171}\approx4216.374269\,{\rm g}

정확한 몸무게v와 그 빈도nv를 쓰면 원자료 평균과 정확히 같습니다. 하지만 구간 중심cb로 모든 구간 안의 값을 대체하면 근사입니다. 이 구간화의 평균은 원평균보다 약14.619883 g 큽니다. 구간 안의 원값이 사라진 뒤에는 원평균을 정확히 복원할 수 없습니다.

먼저 생각한 뒤 풀이 보기: 히스토그램의 세로축이 빈도인지 밀도인지 어떻게 확인하나요?
relative frequencyb=nb342,densityb=nb342 wb,∑bdensityb wb=1\text{relative frequency}_b=\frac{n_b}{342},\qquad\text{density}_b=\frac{n_b}{342\,w_b},\qquad\sum_b\text{density}_b\,w_b=1

여기서는 빈도 막대를 그립니다. 상대빈도는 무차원, 밀도는1/g 단위입니다. 밀도 그림에서는 높이 자체가 아니라 높이×구간 폭인 면적이 해당 비중입니다. 폭이 다른 구간들을 비교할 때 빈도 높이만 나란히 놓으면 면적과 비중을 혼동하기 쉽습니다.

같은 몸무게 변수의 종별 요약
관측 종유효 n평균 (g)중앙값 (g)
Adelie1513,700.6622523,700
Chinstrap683,733.0882353,700
Gentoo1235,076.0162605,000
먼저 생각한 뒤 풀이 보기: 그램을 킬로그램으로 바꾸면 순위나 중심의 뜻도 바뀌나요?

모든 몸무게를1000으로 나눕니다. 평균은4.201754386 kg, 중앙값은4.05 kg, 최빈값은3.8 kg가 됩니다. 양의 일정 배율 변환이라 순위와 빈도는 보존됩니다. g값과 kg값을 한 열에서 섞어 평균내는 것은 단위 변환과 다릅니다.

먼저 생각한 뒤 풀이 보기: 전체 평균4.20 kg가 모든 종의 전형적인 펭귄인가요?

전체는 서로 다른 종이 섞인 요약입니다. 유효 관측수151·68·123의 비중도 함께 들어갑니다. 전체 그림과 종별 평균·중앙값을 같이 읽으면 어떤 구성이 전체 평균을 만들었는지 알 수 있습니다. 모든 남극 펭귄의 무작위 표본이라는 가정도 추가하지 않습니다.

자료: Horst·Hill·Gorman / Palmer LTER · 실제 개체 측정 (CC0) · 원자료·요약 CSV

기업 사례 · 품목 평균은 올랐는데 중앙값은 내렸다

Apple 두 회계연도의 실제 다섯 품목 순매출을 같은 순서로 비교합니다. 값의 단위는 백만 명목 USD입니다. 이익이나 고객 수가 아니며 FY2023은53주, FY2024는52주입니다. 이 표의 평균은 한 기업이 공시한 다섯 품목의 평균이지 기업 다섯 개의 평균이 아닙니다.

실제 공시 값과 같은 품목의 차이
품목FY2023FY2024FY2024−FY2023
iPhone200,583201,183600
Mac29,35729,984627
iPad28,30026,694-1,606
웨어러블·홈·액세서리39,84537,005-2,840
서비스85,20096,16910,969
같은5개 값에서 평균과 중앙값은 다른 질문에 답한다
요약 (백만 USD)FY2023FY2024두 요약의 차이
총액383,285391,0357,750
품목 평균76,65778,2071,550
품목 중앙값39,84537,005-2,840
먼저 생각한 뒤 풀이 보기: 평균은1550 늘었는데 중앙값은2840 줄어도 가능한가요?

가능합니다. 평균 변화는 총매출 변화7,750을5로 나눈1,550입니다. 각 연도의 순서상 가운데 값은 FY2023 39,845, FY2024 37,005라 중앙값 변화는−2,840입니다. 서비스10,969·iPhone600·Mac627 증가에 iPad1,606·웨어러블2,840 감소를 합치면 총액이7,750 증가합니다. 평균과 중앙값 중 하나가 틀린 것이 아니라 서로 다른 요약입니다.

먼저 생각한 뒤 풀이 보기: 차이의 평균과 평균의 차이는 언제 같나요?
15∑j=15(yj−xj)=y‾−x‾=1550(million USD)\frac15\sum_{j=1}^5(y_j-x_j)=\overline y-\overline x=1550\quad({\rm million\ USD})

동일한5품목·동일한 가중치로 짝을 맞춘 경우 평균의 선형성 때문에 같습니다. 누락된 품목을 다르게 제외하거나 가중치를 바꾸면 같은 식의 조건을 다시 확인해야 합니다.

먼저 생각한 뒤 풀이 보기: 그러면 차이의 중앙값도 중앙값의 차이와 항상 같나요?

전체5품목의 짝별 변화는−2,840,−1,606,600,627,10,969 순서이므로 변화의 중앙값은600입니다. 각 연도 중앙값의 차이−2,840과 이미 다릅니다. 같은 원표에서 iPhone·Mac·iPad 세 품목만 선택해도 비교할 수 있습니다. FY2023 중앙값29,357, FY2024 중앙값29,984이므로 차이는627입니다. 짝별 변화는600,627,−1,606이라 변화의 중앙값은600입니다. 실제 부분 자료에서627≠600이므로 일반적인 등식이 아닙니다. 두 계산은 각각 무엇을 요약하는지 구별합니다.

먼저 생각한 뒤 풀이 보기: 중앙값이 내려갔으니 회사의 모든 매출이 줄었다고 말할 수 있나요?

아닙니다. 총액은 증가했고 품목별 방향도 다릅니다. 어느 요약을 쓰는지와 대상·기간을 먼저 적습니다. 기간 길이가 다르므로 이 표만으로 동일 주수의 성장률이나 다음 해 예측을 확정하지 않습니다. 원수치의 기술적 비교와 해석의 범위를 함께 전달합니다.

자료: SEC EDGAR · Apple 실제 품목 순매출 · 원자료·요약 CSV

정확한 몸무게·종별 빈도표 · 구간·포함 규칙·빈도·밀도 CSV · 자료·정의·가공·해시

Country case · Does the mean equal a middle country?

Fix sixteen actual 2024 GDP/person values. Compare countries at one date rather than mixing country-years. The unweighted arithmetic mean sums all values and divides by sixteen. The median orders them and locates the middle. The target is this selected distribution of national indicators, not worldwide individual incomes.

y‾=∑i=116yi16≈31100.238572,y~=y(8)+y(9)2=37512.5317894897\overline y=\frac{\sum_{i=1}^{16}y_i}{16}\approx31100.238572,\qquad\widetilde y=\frac{y_{(8)}+y_{(9)}}2=37512.5317894897

Parenthesized y(8) means the eighth ordered value, not the eighth year. It is Korea’s 37048.4264001496; the ninth is Japan’s 37976.6371788298. Their average is the median, which need not equal any one country’s observed value.

Order actual values and identify both middle positions
RankCountry codeActual GDP/person (2015 USD/person)Middle position
1IND2,366.832891
2VNM4,012.507799
3IDN4,367.947418
4ZAF5,715.475315
5BRA9,566.745187
6MEX10,284.033693
7CHN13,119.107610
8KOR37,048.4264008th/9th
9JPN37,976.6371798th/9th
10FRA39,683.395349
11DEU44,027.763155
12CAN45,061.386459
13GBR47,900.968014
14AUS61,486.381475
15USA66,856.513170
16SGP68,129.696040
Think first, then reveal: Must the median 37512.53 be an actually observed “middle country”?

With sixteen observations, the definition averages the two middle values. No record need equal that number. Median position 8.5 also differs from median value 37512.53. For an odd number of values, use the single middle-ranked observation.

Think first, then reveal: Is a mean below the median a calculation error?

No. The mean responds to every value’s magnitude; the median responds mainly to middle ranks. Distances among low and high national indicators affect the mean. Inspect the ordered plot and endpoints before drawing conclusions about overall shape. A high GDP/person value is not automatically an erroneous outlier.

Think first, then reveal: Would connecting countries alphabetically reveal a time trend?

Country names and GDP ranks are not time. This order helps read value sizes. A time trend instead fixes a country and orders calendar years. Specify whether the horizontal axis represents countries, time or ranks.

Think first, then reveal: Is this the population-weighted mean?

No. Each country receives weight 1/16. Population weighting changes both the calculation and the question. This national-indicator median is not residents’ median income either. State weights alongside observation units.

Source: World Bank · NY.GDP.PCAP.KD, actual 2024 indicators · Actual values and summaries CSV

Individual-organism case · Read 342 actual masses as a distribution

Of 344 Palmer penguin records, 342 contain body mass. Both missing rows remain in the downloadable data. Valid counts are 151 Adélie, 68 Chinstrap and 123 Gentoo. Sex is not needed here, so nine additional records are not excluded for missing sex.

m‾=1437000342≈4201.754386 g,m~=4050 g,mode⁡(m)=3800 g (12 records)\overline m=\frac{1437000}{342}\approx4201.754386\,{\rm g},\qquad\widetilde m=4050\,{\rm g},\qquad\operatorname{mode}(m)=3800\,{\rm g}\ (12\text{ records})

The mean divides the total, the median averages ordered positions 171 and 172, and the mode is most frequent. These summarize the same records differently. Twelve reported masses equal 3800 g; the other 330 need not. Reporting resolution can affect a measured variable’s mode.

1. Define histogram intervals explicitly

Use 500 g intervals from 2500 through 6500 g. [2500,3000) includes 2500 but puts 3000 in the next interval. Only the last interval [6000,6500] includes its right endpoint. This includes observed endpoints 2700 and 6300 g without counting any value twice.

Actual frequencies and species composition · valid denominator 342
Interval (g)AllAdélieChinstrapGentoo
2500–3000 (upper excluded)9720
3000–3500 (upper excluded)6247150
3500–4000 (upper excluded)9458351
4000–4500 (upper excluded)59311315
4500–5000 (upper excluded)518340
5000–5500 (upper excluded)340034
5500–6000 (upper excluded)290029
6000–6500 (upper included)4004
Think first, then reveal: Which interval receives an observed 3000 g value?

[3000,3500). Boundary and inclusion rules prevent overlap and omissions. Different widths and starting points can change the appearance of the same records. Bar shape alone does not establish whether there is one species or three.

Think first, then reveal: Do exact-value frequencies and interval frequencies recover the same mean?
m‾=∑vv nv342,m‾midpoint=∑bcb nb342=721000171≈4216.374269 g\overline m=\frac{\sum_v v\,n_v}{342},\qquad\overline m_{\rm midpoint}=\frac{\sum_b c_b\,n_b}{342}=\frac{721000}{171}\approx4216.374269\,{\rm g}

Exact observed values v and their counts nv reproduce the raw-data mean exactly. Replacing every within-bin value with midpoint cb gives an approximation. Here it exceeds the actual mean by approximately 14.619883 g. The exact original mean generally cannot be reconstructed from bin counts alone.

Think first, then reveal: Does the vertical axis represent frequency or density?
relative frequencyb=nb342,densityb=nb342 wb,∑bdensityb wb=1\text{relative frequency}_b=\frac{n_b}{342},\qquad\text{density}_b=\frac{n_b}{342\,w_b},\qquad\sum_b\text{density}_b\,w_b=1

This plot uses frequencies. Relative frequency is dimensionless; density has units 1/g. In a density histogram, bar area, height times width, gives the proportion. Unequal-width bins make it especially important not to confuse raw frequency heights with proportional areas.

Species-specific summaries of the same mass variable
Observed speciesValid nMean (g)Median (g)
Adelie1513,700.6622523,700
Chinstrap683,733.0882353,700
Gentoo1235,076.0162605,000
Think first, then reveal: Does converting grams to kilograms change ranks or meanings of centers?

Divide every mass by 1000. The mean becomes 4.201754386 kg, median 4.05 kg and mode 3.8 kg. A common positive scale preserves ranks and frequencies. Mixing gram and kilogram values in one column is not a valid unit conversion.

Think first, then reveal: Is the pooled mean 4.20 kg typical of every species?

It combines different species with observed counts 151, 68 and 123. Read pooled plots alongside species-specific means and medians to see how composition shapes the center. Do not add a random-sample claim for all Antarctic penguins.

Source: Horst, Hill, Gorman / Palmer LTER · actual organism measurements (CC 0) · Actual values and summaries CSV

Company case · The category mean rose while the median fell

Compare Apple’s five actual category net-sales totals in matched order. Units are million nominal USD, not profit or customers. FY 2023 contained 53 weeks and FY 2024 52. The mean summarizes five disclosed categories of one company, not five companies.

Actual disclosed values and matched category changes
CategoryFY 2023FY 2024FY 2024−FY 2023
iPhone200,583201,183600
Mac29,35729,984627
iPad28,30026,694-1,606
Wearables, Home and Accessories39,84537,005-2,840
Services85,20096,16910,969
Different summaries answer different questions for the same five values
Summary (million USD)FY 2023FY 2024Difference
Total383,285391,0357,750
Category mean76,65778,2071,550
Category median39,84537,005-2,840
Think first, then reveal: Can the mean rise by 1550 while the median falls by 2840?

Yes. The mean change is total change 7750 divided by five, or 1550. The middle-ranked values are 39845 and 37005, giving median change −2840. Services’ increase of 10969 combines with other category changes to increase total sales. Both summaries are correct but describe different features.

Think first, then reveal: When does mean change equal change in means?
15∑j=15(yj−xj)=y‾−x‾=1550(million USD)\frac15\sum_{j=1}^5(y_j-x_j)=\overline y-\overline x=1550\quad({\rm million\ USD})

Linearity gives the equality for the same five matched categories with the same weights. Recheck those conditions if omissions or weighting differ.

Think first, then reveal: Must median change likewise equal change in medians?

Across all five categories, sorted paired changes are −2840, −1606, 600, 627 and 10969, so their median is 600. This already differs from the change in year-specific medians, −2840. Selecting the actual iPhone, Mac and iPad entries gives another comparison. Their year-specific medians are 29357 and 29984, a difference of 627. Matched changes are 600, 627 and −1606, with median 600. Thus 627≠600 on an actual subset disproves a general equality. Specify which summary each calculation describes.

Think first, then reveal: Does a lower median mean every sales category declined?

No. The total increased and category directions differ. State the summary, target and period first. Unequal fiscal weeks also prevent automatically interpreting these totals as equal-period growth or next-year forecasts. Communicate both the descriptive comparison and its scope.

Source: SEC EDGAR · actual Apple category net sales · Actual values and summaries CSV

Exact mass and species frequencies · Bins, endpoint rules, frequencies and densities CSV · Inputs, definitions, processing and hashes

기초Foundations

38. 공식 읽기와 스스로 다시 그리는 과제38. Primary readings and an independent graphing task

NIST 히스토그램에서 빈도·상대빈도·밀도 정규화의 차이를 대조하세요. 중심 위치 설명을 읽을 때는 동률·중앙값 관례·평균 존재 조건과 본 장 반례를 함께 유지합니다. 평균이 모든 목적의 최적 요약이라는 의미로 확대하지 않습니다.

R 공식 quantile 문서는 type 1과 type 7을 직접 구별합니다. 원자료 4값을 골라 두 관례의 p=0.5와 p=0.25를 손으로 계산하고 프로그램 출력 옆에 알고리즘 이름을 쓰세요.

OpenStax 중심 요약의 기본 계산을 실제 펭귄 사본으로 다시 해 보세요. 본문의 영상·인물·사례를 본 뒤에는 구간폭 두 종류와 ECDF를 같은 원자료로 만들어 어떤 정보가 유지되는지 설명합니다. 다음 장은 흩어짐과 두 변수의 함께 움직임을 다룹니다.

Python · R · 원자료·단위·가공·출처

Compare count and density normalization in the NIST histogram guide. Pair its location discussion with our tie, convention, existence and counterexample conditions.

The official R quantile documentation distinguishes types 1 and 7. Calculate two probabilities for a four-value sample and label the chosen algorithm.

Recompute basic center summaries on actual penguins. Then compare two histograms and an ECDF from the same values. Next comes spread and joint variation.

Python · R · Inputs, units, transformations and sources

Python·R 코드 실행 방법Run the Python/R companions

자료 묶음을 풀고 코드와 실제데이터 폴더를 함께 두세요. 터미널에서 코드 파일이 있는 폴더로 이동해 아래 명령을 실행합니다. 코딩이 처음이라면 손계산과 웹 실습을 먼저 하고, 데이터 사이언스 입문에서 코드를 배운 뒤 돌아와도 됩니다.Extract the bundle, keeping the scripts beside the data folder. In a terminal, enter the script folder and run the commands below. Beginners can complete hand calculations and browser labs first, returning to code after studying introductory data science.

python stat02-reproduce.py
Rscript --vanilla --encoding=UTF-8 stat02-reproduce.R

결과 파일은 각 코드에 지정된 결과 폴더에 저장됩니다. CSV 원자료는 덮어쓰지 않습니다.Result files are saved in the result directory specified by each script; the input CSVs are not overwritten.

영상·학자·함께 읽기Videos, thinkers and guided reading

본문의 질문을 넓히는 선택 학습입니다. 영상을 보기 전 질문을 먼저 읽고, 자신의 답을 쓴 뒤 해설과 비교하세요. 자료의 언어·선수 지식은 각 항목에 표시했습니다.Optional extensions to the chapter. Read the question first, write your answer, then compare with the explanation. Language and prerequisites are indicated below.

평균·중앙값·최빈값은 무엇을 요약할까?Mean, Median, and Mode: Measures of Central Tendency

CrashCourse · Statistics 3

본문에서 공식 영상을 보고 세 중심의 계산 순서를 따라갑니다. 기업 표에서 평균과 중앙값의 변화 방향이 다른 이유를 원값으로 설명해 보세요.Watch the official video in this chapter and follow the three center calculations. Explain the company’s opposite mean/median changes using actual values.

교재 안의 YouTube 플레이어에서 재생합니다. 원영상에서 제공하는 자막은 플레이어의 CC·설정에서 선택할 수 있습니다.Playback stays in this chapter’s YouTube player. Available captions can be selected through CC/settings.

보고 읽은 뒤 답하기Respond after watching/reading 같은 자료에서 중심 요약은 하나만 옳은가요?Can only one center be correct for a dataset?

생각을 점검하는 해설Check your reasoning

평균·중앙값·최빈값은 다른 정의입니다. 모두 맞게 계산할 수 있지만 어떤 질문에 적절한지는 분포·단위·관측 대상을 함께 보고 정합니다.They have different definitions and can all be calculated correctly. Choose a summary by considering the question, distribution, units and observation target.

존 튜키 · 숫자를 요약하기 전에 자료를 살펴보기John Tukey: examine data alongside numerical summaries

University of St Andrews · MacTutor

대학 소개의 튜키(1915–2000)와 자료 분석·가정 점검에 관한 내용을 읽습니다. 한 숫자와 원자료 그림을 함께 보는 습관을 연결하세요.Read the university biography of Tukey (1915–2000), focusing on data analysis and checking assumptions. Pair numerical summaries with views of the actual data.

공식 자료 읽기 ↗Read official resource ↗

보고 읽은 뒤 답하기Respond after watching/reading 펭귄 전체 평균만 보면 무엇을 놓칠 수 있나요?What can a pooled penguin mean hide?

생각을 점검하는 해설Check your reasoning

종별 크기 차이·혼합 비중·측정 단위·빈값의 분모를 놓칠 수 있습니다. 원그림과 종별 요약을 함께 읽으면 전체 숫자의 구성을 볼 수 있습니다.Species differences, mixture weights, measurement units and missing-value denominators. Plots and group summaries reveal the composition behind the pooled number.

정확한 빈도 평균과 구간 중심 근사의 차이Exact frequency means versus bin-midpoint approximations

OpenStax · Introductory Statistics 2e · 2.5

평균·중앙값·최빈값의 정의와 “Calculating the Mean of Grouped Frequency Tables”를 읽습니다. 실제 구간 중심 근사 오차를 확인하세요.Read the mean/median/mode definitions and “Calculating the Mean of Grouped Frequency Tables.” Compare the approximation with the exact actual-data mean.

공식 자료 읽기 ↗Read official resource ↗

보고 읽은 뒤 답하기Respond after watching/reading 구간 빈도만으로 왜 정확한 평균을 알기 어려운가요?Why do bin counts generally not determine an exact mean?

생각을 점검하는 해설Check your reasoning

구간 안의 개별 값이 사라집니다. 중심값으로 대체한 평균은 근사이고, 원값이나 정확한 값별 빈도가 있으면 정확한 평균을 계산할 수 있습니다.Individual positions inside each bin are lost. Midpoint substitution is approximate; raw values or exact-value frequencies permit the exact mean.

히스토그램 구간과 상대빈도를 직접 정의하기Define histogram bins and relative frequencies

OpenStax · Introductory Statistics 2e · 2.2

도입부의 빈도·상대빈도와 구간 정의를 읽고 본문500 g 구간을 재현합니다. 고정된 구간 규칙과 세로축 단위를 먼저 기록하세요.Read the introductory frequency, relative-frequency and bin discussion; reproduce our 500 g intervals. Record endpoint rules and vertical-axis units first.

공식 자료 읽기 ↗Read official resource ↗

보고 읽은 뒤 답하기Respond after watching/reading 빈도와 밀도의 세로축 단위는 같나요?Do frequency and density heights have the same units?

생각을 점검하는 해설Check your reasoning

아닙니다. 이 밀도는 상대빈도/구간 폭이라1/g이고 면적이 비중입니다. 원그림은 측정행을 센 빈도입니다.No. Density here divides relative frequency by bin width, giving 1/g; area gives a proportion. Our original plot counts measurement records.

연습문제 · 계산에서 설명과 증명까지Exercises: calculation, explanation and proof

먼저 혼자 풀고 풀이를 여세요. 숫자와 함께 단위·포함 기준·계산 이유를 확인하세요.Attempt each problem before opening its solution. Check units, inclusion rules and the reason for the calculation.

1. 같은 평균의 다른 분포Same mean, different distributions

가정 자료 A=(2,2,2,2,2),B=(0,0,0,0,10)의 평균과 중앙값을 비교하세요.

Compare means and medians of hypothetical A=(2,2,2,2,2), B=(0,0,0,0,10).

풀이와 확인할 이유Solution and explanation

둘 다 합10, n=5라 평균2입니다. 중앙값은 A에서2, B에서0입니다. 같은 평균이 모든 값의 위치나 분포를 결정하지 않음을 보여 줍니다. 원값과 그림을 함께 확인해야 합니다.

Both means equal 2, but medians are 2 and 0. A mean does not determine the distribution; inspect values and graphs together.

2. 종 빈도와 몸무게 분모Species and mass denominators

전체 종 빈도152·124·68과 몸무게 유효 종 빈도151·123·68의 합을 구하고 차이를 설명하세요.

Sum full species counts 152,124,68 and mass-valid counts 151,123,68. Explain the difference.

풀이와 확인할 이유Solution and explanation

각각344와342입니다. 종은 있지만 몸무게가 없는 두 기록이 첫 표에는 포함됩니다. 몸무게 히스토그램의 분모는342이며 전체 종 비율의344와 다릅니다.

The totals are 344 and 342. Two records have species but no mass. Mass histograms and full species shares therefore use different denominators.

3. 복수 응답의 합계Multiple responses

가정한10명 설문에서7명이 A,6명이 B를 복수 선택했습니다. 합13을 빈도 오류로 단정해도 되나요?

Ten hypothetical respondents choose A7 times and B6 times with multiple choices allowed. Is total 13 necessarily an error?

풀이와 확인할 이유Solution and explanation

아닙니다. 응답자는10명이어도 선택 건수는13일 수 있습니다. 각 선택 비율7/10,6/10의 합은130%지만 서로 배타적인 전체 분할이 아니기 때문입니다. 사람 수와 응답 건수 분모를 명시합니다.

No. Selections can exceed respondents. The 70% and 60% shares do not partition the population. Explain whether the denominator is people or choices.

4. 건수와 비율의 순서Counts versus proportions

A집단20/100과 B집단15/30을 건수·상대도수로 비교하세요.

Compare 20/100 in group A with 15/30 in group B by counts and shares.

풀이와 확인할 이유Solution and explanation

건수는20>15지만 비율은20%<50%입니다. A가 더 많은 건수를 보인다는 것과 B에서 더 높은 비율이라는 문장은 함께 참입니다. 어느 비교가 질문에 맞는지 결정해야 합니다.

Counts favor A20> 15, but shares are 20%< 50%. Both statements are compatible because denominators differ.

5. 반올림 비율의 합Rounding percentages

세 범주의 빈도가1·1·1일 때 소수 한 자리 백분율의 합과 정확 비율의 합을 비교하세요.

Three categories each have count 1. Compare exact shares with percentages rounded to one decimal.

풀이와 확인할 이유Solution and explanation

각각33.3%로 표시하면 합99.9%입니다. 정확값은 각1/3이라 합1입니다. 표시 반올림으로 생긴 차이를 맞추려고 원빈도를 바꾸지 않습니다.

Displayed shares 33.3% sum to 99.9%, while exact thirds sum to one. Preserve original counts rather than changing data to force a display total.

6. 막대와 히스토그램Bars versus histograms

종 범주 막대의 가로 간격과 몸무게 히스토그램 구간폭은 같은 의미인가요?

Do category-bar spacing and histogram bin widths have the same meaning?

풀이와 확인할 이유Solution and explanation

종 이름 간격은 수량 차이를 나타내지 않을 수 있습니다. 몸무게 구간폭은 실제 g축의 길이입니다. 히스토그램 밀도 면적을 해석하려면 폭을 사용하지만 범주 사이 거리를 생물학적 수량처럼 읽지는 않습니다.

No. Category spacing need not encode quantity; mass-bin widths encode real gram distances. Density areas depend on those widths.

7. 경계값 한 번 세기Count boundaries once

[2500,3000),[3000,3500),마지막[3500,4000]에서3000·3500·4000은 어디에 들어가나요?

For bins[2500,3000),[3000,3500), final[3500,4000], place 3000,3500,4000.

풀이와 확인할 이유Solution and explanation

3000은 둘째, 3500과4000은 마지막 구간입니다. 앞 두 구간의 오른끝은 제외되고 마지막만 오른끝을 포함합니다. 세 값 모두 정확히 한 번 들어갑니다.

3000 enters the second bin; 3500 and 4000 enter the final bin. Each value is counted once under the stated convention.

8. 폭이 다른 밀도Unequal-width density

[0,1),[1,3]에 각각10개, n=20일 때 상대도수·밀도 높이·면적을 계산하세요.

Bins[0,1),[1,3] each contain 10 of 20 values. Compute relative frequencies, density heights and areas.

풀이와 확인할 이유Solution and explanation

상대도수는 각1/2입니다. 밀도 높이는1/2와1/4이고 면적은 각각 높이×폭=1/2입니다. 전체 면적1입니다. 같은 비율이 항상 같은 밀도 높이를 뜻하지는 않습니다.

Shares are½ each; density heights are½ and¼. Areas are½ each, totaling one. Equal shares need not have equal density heights.

9. 밀도의 단위 변환Density units

500g 구간의 비율이1/4이면 g축과 kg축 밀도 높이는 각각 얼마인가요?

A500 g bin has share¼. Find density height on gram and kilogram axes.

풀이와 확인할 이유Solution and explanation

g축 높이는(1/4)/500=0.0005 g⁻¹입니다. 폭0.5kg에서는(1/4)/0.5=0.5 kg⁻¹입니다. 높이 수치는1000배지만 각 면적은1/4로 같습니다.

The heights are 0.0005 per gram and 0.5 per kilogram. The numeric height scales 1000-fold while area remains¼.

10. 표시 범위를 자르면Cropping a display

유효100값 중90개만 축 범위에 들어갑니다. 보이는 빈도 합90을 유효 n이라고 조용히 바꿔도 되나요?

Only 90 of 100 valid values fall inside a plotted range. May n silently become 90?

풀이와 확인할 이유Solution and explanation

전체 질문을 유지하면 n=100이고 범위 밖10개를 표시해야 합니다. 보이는 값에 조건부인 분포를 새로 만들려면 그 선택과 분모90을 별도 설명합니다. 표시 생략이 결측이나 삭제를 자동 의미하지 않습니다.

No. Retain total 100 and report 10 outside, or explicitly define a range-conditioned distribution with denominator 90. Display cropping is not automatic data deletion.

11. 경험 CDF 계산Compute an empirical CDF

자료(1,2,2,5)에서 F(0),F(1),F(2),F(4),F(5)를 구하세요.

For(1,2,2,5), find F(0), F(1), F(2), F(4), F(5).

풀이와 확인할 이유Solution and explanation

각각0,1/4,3/4,3/4,1입니다. ≤문턱으로 세므로2에 있는 두 값이 함께 포함됩니다. 2 바로 아래의 값1/4와 F(2)=3/4를 연결할 때 점프를 보존합니다.

The values are 0,¼,¾,¾,1. The two ties enter together at 2 under the≤rule, preserving a jump rather than diagonal interpolation.

12. 동률의 점프A tied-value jump

유효 n=20에서 값7이4번 기록되면 ECDF는7에서 얼마나 뛰나요?

With n=20 and four records equal to 7, how large is the ECDF jump at 7?

풀이와 확인할 이유Solution and explanation

점프 크기는4/20=0.2입니다. 7 바로 아래 누적비율에0.2를 더한 것이 F(7)입니다. 그 값 자체의 비율과7이하 전체 누적비율은 다릅니다.

It is 4/20=0.2. Add it to the cumulative share just below 7. Distinguish point mass from the full cumulative probability.

13. p=0과 빈 자료Zero probability and empty data

역경험CDF qₚ의 p=0 표시 관례와 빈 자료의 분위수·평균을 설명하세요.

Explain the p=0 display convention for inverse-ECDF quantiles and centers of empty data.

풀이와 확인할 이유Solution and explanation

비어 있지 않은 자료에서는 p=0을 최솟값으로 별도 정합니다. 원래 inf{t:F(t)≥0}는−∞여서 같은 공식 대입이 아닙니다. 빈 자료는 CDF·분위수·평균·중앙값이 미정의이며 빈도0과 구별합니다.

For nonempty data, set q 0 to the minimum separately; the unrestricted infimum formula at zero is−∞. Empty data have undefined CDF, quantiles, mean and median despite zero counts.

14. 두 중앙값 관례Two center conventions

자료(1,2,10,20)의 역CDF q₀.₅와 관습적 표본중앙값을 구하세요.

For(1,2,10,20), find inverse-ECDF q 0.5 and the conventional sample median.

풀이와 확인할 이유Solution and explanation

ceil(4·0.5)=2라 역CDF 값은2입니다. 관습적 중앙값은(2+10)/2=6입니다. 서로 다른 정의로 같은 이름을 쓰면 혼란이 생기므로 알고리즘을 명시합니다.

The inverse rank is 2, giving value 2. The conventional median averages 2 and 10, giving 6. Label the definitions.

15. 분위수 보간 관례Quantile interpolation

자료(1,2,3,10)의 p=0.25를 역CDF와 type7의 위치 h=1+(n−1)p로 각각 구하세요.

For(1,2,3,10), compute p=0.25 using inverse ECDF and type 7 position h=1+(n−1) p.

풀이와 확인할 이유Solution and explanation

역CDF는 ceil(1)=1번째 값1입니다. type7은 h=1.75라 첫째1과둘째2를0.75 비율로 보간해1.75입니다. 이는 정의 차이이며 같은 표본에서 값이 다를 수 있습니다.

Inverse ECDF selects rank 1, value 1. Type 7 has h=1.75 and interpolates to 1.75. Different algorithms need not match.

16. 정확한 확률 경계An exact probability boundary

n=4에서 p=0.5와 정확한 십진수 p=0.5000000000000001의 ceil(np)를 비교하세요.

For n=4, compare ceil(np) at exact decimals 0.5 and 0.5000000000000001.

풀이와 확인할 이유Solution and explanation

첫 위치는ceil(2)=2입니다. 두 번째는2.0000000000000004라 올림3입니다. 수학적 정확 입력의 결과와 소프트웨어 부동소수점·fuzz 처리를 구별해야 합니다. 입력·버전·관례를 기록합니다.

The ranks are 2 and 3 because the second product is 2.0000000000000004. Exact input semantics and floating-point fuzz conventions can differ; record both.

17. 중앙 위치와 값Median positions and values

n=342에서 관습적 중앙값에 쓰는 위치와 두 값이 모두4050g일 때 중앙값을 구하세요.

For n=342, which ranks define the conventional median, and what if both equal 4050 g?

풀이와 확인할 이유Solution and explanation

위치는171과172이고 평균값은4050g입니다. 위치171.5를 몸무게로 읽지 않습니다. 동률이 있으면 가운데 두 값이 같을 수 있습니다.

Use ranks 171 and 172, giving 4050 g. The position 171.5 is not a measured mass.

18. 짝수 절대손실 최소구간Even-sample absolute-loss interval

자료(1,2,10,20)의 Σ|xᵢ−c|를 최소화하는 c 전체와 관습적 중앙값을 구하세요.

Find all minimizers of Σ|xᵢ−c| for(1,2,10,20) and the conventional median.

풀이와 확인할 이유Solution and explanation

최소집합은[2,10]이고 관습적 대표는6입니다. 이 구간에서 각 양끝 짝의 거리합이 일정하여 총27입니다. 유일한 최소라고 쓰면 틀립니다.

Every c in [2,10] minimizes the sum at 27. The conventional median is 6, one representative of a nonunique minimizing interval.

19. 중앙값 증명의 짝Pairing proof for medians

a≤b에서 |a−c|+|b−c|≥b−a와 등호 조건을 쓰고 정렬 양끝 짝의 역할을 설명하세요.

State the inequality and equality case for |a−c|+|b−c| with a≤b, and connect it to ordered pairs.

풀이와 확인할 이유Solution and explanation

삼각부등식에서 |b−a|≤|b−c|+|c−a|입니다. 등호는 c가[a,b]안에 있을 때입니다. 모든 정렬 양끝 짝이 동시에 등호를 갖는 교집합은 가운데 구간이며 홀수면 남은 중앙값이 이를 한 점으로 정합니다.

Triangle inequality gives at least b−a, with equality exactly for c∈[a, b]. Intersecting all outer-pair intervals leaves the central interval; an odd leftover center pins down one value.

20. 평균의 균형Balance at the mean

자료(1,2,3,4,10)의 평균과 평균에서 편차 합을 구하세요.

For(1,2,3,4,10), find the mean and sum of deviations.

풀이와 확인할 이유Solution and explanation

합20, n=5라 평균4입니다. 편차(−3,−2,−1,0,6)의 합은0입니다. 이것은 빈도나 정규성 가정이 아니라 평균 정의의 대수적 성질입니다.

The mean is 4. Deviations(−3,−2,−1,0,6) sum to zero by the arithmetic definition, not a normality assumption.

21. 제곱손실 완전제곱Squared-loss identity

자료(1,2,3)에서 평균의 제곱손실과 c=0의 손실을 구하고 차이를 n(c−평균)²로 검산하세요.

For(1,2,3), compare squared losses at the mean and c=0, checking n(c−mean)².

풀이와 확인할 이유Solution and explanation

평균2에서 손실은1+0+1=2입니다. c=0에서는1+4+9=14입니다. 차이12=3·(0−2)²로 항등식과 같습니다. 유한 n≥1에서 평균의 유일한 최소를 확인합니다.

Loss at mean 2 is 2, while loss at 0 is 14. The difference 12 equals 3·4, confirming the identity and unique squared-loss minimizer.

22. 최빈값의 동률Tied modes

자료(1,1,2,2,3)의 최빈값을 구하고 “유일한 봉우리”라는 말과 구별하세요.

Find the modes of (1,1,2,2,3) and distinguish them from a unique histogram peak.

풀이와 확인할 이유Solution and explanation

1과2가 각각2번이라 둘 다 표본 최빈값입니다. 특정 히스토그램에서 두 값이 한 구간에 합쳐질 수 있어 그림 봉우리 수와 정확값 최빈수는 같지 않을 수 있습니다. 모집단 밀도의 봉우리는 또 다른 개념입니다.

Both 1 and 2 occur twice and are modes. A histogram can merge them into one bin; exact-value modes, bin peaks and population-density peaks are different.

23. 한 값 교체의 평균 변화Mean change from one replacement

n=342의 실제자료에서 기록3750g 하나를 가정값20000g로 바꾸면 평균은 얼마 변하나요?

In n=342 actual records, replace one 3750 g mass by hypothetical 20000 g. How much does the mean change?

풀이와 확인할 이유Solution and explanation

변화는(20000−3750)/342=8125/171≈47.514620g입니다. 원평균에 이 값을 더합니다. 가정값은 새 측정이 아니며 원값을 별도 보존해야 합니다.

The change is 8125/171≈47.514620 g. Add it to the original mean. This is a labeled hypothetical replacement, not a new measurement.

24. 중앙값도 변할 수 있다Medians can change

(1,2,3)의2를100으로 바꿀 때 평균·중앙값을 구하고 강건성 문장을 평가하세요.

Replace 2 by 100 in (1,2,3). Find the new mean and median and evaluate a robustness claim.

풀이와 확인할 이유Solution and explanation

새 자료(1,3,100)의 평균은104/3, 중앙값은3입니다. 이전 중앙값2에서 달라졌습니다. 극단값에 덜 민감하다는 것과 어떤 변경에도 불변이라는 것은 다릅니다.

The new mean is 104/3 and median 3, changed from median 2. Reduced extreme-value sensitivity does not mean invariance to all changes.

25. 같은 중심과 비대칭Equal centers without symmetry

(0,1,2,2,5)의 평균·중앙값을 구하고2를 중심으로 대칭인지 확인하세요.

For(0,1,2,2,5), find mean and median and test symmetry about 2.

풀이와 확인할 이유Solution and explanation

합10, n=5라 평균2이고 가운데도2입니다. 그러나 편차−2,−1,0,0,+3이 거울 짝을 이루지 않습니다. 두 중심의 같음이 대칭의 충분조건은 아닙니다.

Both centers equal 2, but deviations−2,−1,0,0,+3 do not mirror. Equal mean and median are insufficient for symmetry.

26. 같은 단위 변환A common unit conversion

모든 몸무게를g에서kg로 나누면 평균·관습적 중앙값·역CDF 분위수는 어떻게 변하나요?

How do mean, conventional median and inverse-CDF quantiles change when every mass is converted from grams to kilograms?

풀이와 확인할 이유Solution and explanation

양의 선형 변환이므로 모두1000으로 나뉩니다. 순서도 유지되고 두 가운데 평균도 같은 배율로 바뀝니다. 실제 평균4201.754386g은4.201754386kg,중앙값4050g은4.05kg입니다.

All divide by 1000. The positive linear transformation preserves order and midpoint averaging. Actual mean 4201.754386 g becomes 4.201754386 kg and median 4050 g becomes 4.05 kg.

27. 비선형 중앙값 변환Nonlinear median transformation

자료(1,9)의 관습적 중앙값에 제곱근을 적용한 것과 먼저 제곱근으로 변환한 자료의 중앙값을 비교하세요.

For(1,9), compare square root of the conventional median with the median after square-root transformation.

풀이와 확인할 이유Solution and explanation

원중앙값은5라 변환은√5입니다. 먼저 변환하면(1,3),중앙값은2입니다. 평균과 제곱근이 교환하지 않아 다르며, 역CDF q₀.₅는1에서1로 대응합니다.

They are√5 and 2 respectively. Averaging does not commute with square roots. The inverse-CDF 0.5 quantile instead maps 1 to 1.

28. 비음수 가중평균A nonnegative weighted mean

값(10,20,30),무게(1,2,1)의 평균을 구하고 관측범위 안인지 확인하세요.

For values(10,20,30), weights(1,2,1), find the weighted mean and check its range.

풀이와 확인할 이유Solution and explanation

가중합80, 총무게4라 평균20입니다. 양의 무게가 붙은 최솟값10과 최댓값30 사이입니다. 무게의 의미가 빈도인지 시간인지도 별도 설명해야 합니다.

The weighted total 80 divided by 4 gives 20, between 10 and 30. State the meaning of the weights as well as their arithmetic.

29. 영가중치 경계Zero-weight boundary

모든 무게가0일 때 가중합과 가중평균을 구별하세요. 한 값에만 양의 무게가 있으면 어떤가요?

Distinguish weighted sum and mean for all-zero weights. What if exactly one weight is positive?

풀이와 확인할 이유Solution and explanation

가중합은0이지만 평균은0/0이라 미정의입니다. 한 값에만 양의 무게가 있으면 평균은 그 값입니다. 영가중치 값을 관측 범위 상계에 무조건 포함할 필요는 없습니다.

The sum is zero but the mean is undefined. In the second case the mean equals the positively weighted value. Zero-weight observations do not constrain the weighted range.

30. 집단 평균 합치기Pool group means

가정한10명 평균2와90명 평균4에서100명 평균과 집단평균의 단순평균을 구하세요.

Combine 10 hypothetical values averaging 2 with 90 averaging 4, and compare the unweighted group-mean average.

풀이와 확인할 이유Solution and explanation

전체는(10·2+90·4)/100=3.8입니다. 두 집단평균의 단순평균은3입니다. 전체 개인을 동일 가중할지 집단을 동일 가중할지에 따라 다른 질문입니다.

The pooled mean is 3.8; the equal-group average is 3. These weight individuals versus groups differently.

31. 실제 종별 평균의 분모Counts for actual species pooling

펭귄 종별 몸무게 평균을 합칠 때151·68·123과152·68·124 중 어느 수를 써야 하나요?

Which counts pool species mass means: 151,68,123 or 152,68,124?

풀이와 확인할 이유Solution and explanation

몸무게 평균을 계산한 가용집합의 수151·68·123을 씁니다. 이 수의 합342로 가중해야 원값 평균을 회복합니다. 전체 종 빈도를 섞으면 존재하지 않는 몸무게의 합을 암묵적으로 추가할 수 있습니다.

Use 151,68,123 from the mass-valid sets, total 342. Mixing full species counts with available-value means combines different analysis sets.

32. 실제 평균 변화의 선형성Actual mean-change linearity

실제 품목매출 평균76657→78207, 총합383285→391035에서 평균변화와 총변화/5를 검산하세요.

Check mean change 76657→78207 against totals 383285→391035 divided across 5 matched categories.

풀이와 확인할 이유Solution and explanation

평균차는1550이고 총차7750을5로 나눠도1550 백만USD입니다. 같은5품목·동일가중이라는 조건이 중요합니다. 이는 품목별 짝지은 변화의 평균과도 같습니다.

Both give 1550 million US dollars. The identity uses the same matched categories and weights, and equals the mean matched change.

33. 실제 중앙값 비선형성Actual median nonlinearity

연도 중앙값39845→37005와 변화(600,627,−1606,−2840,10969)의 중앙값을 비교하세요.

Compare annual medians 39845→37005 with the median of changes(600,627,−1606,−2840,10969).

풀이와 확인할 이유Solution and explanation

연도 중앙값차는−2840입니다. 변화 정렬은−2840,−1606,600,627,10969라 중앙값600입니다. 두 부호가 다른 것은 질문과 정렬대상이 다르기 때문이며 계산 모순이 아닙니다.

The difference of medians is−2840; the median matched change is 600. Different ranked objects explain the opposite signs.

34. 세 품목에서도 다른 중앙값Three-category counterexample

실제 iPhone·Mac·iPad의2023값(200583,29357,28300),2024값(201183,29984,26694)에서 중앙값차와 변화중앙값을 구하세요.

For actual iPhone, Mac, iPad values(200583,29357,28300) and(201183,29984,26694), compare median difference and median change.

풀이와 확인할 이유Solution and explanation

연도 중앙값은29357과29984라 차627입니다. 변화는600,627,−1606이므로 중앙값600입니다. 전체5품목뿐 아니라 이 부분집합에서도 중앙값 선형성은 실패합니다.

Annual medians differ by 627, but matched changes(600,627,−1606) have median 600. Median linearity also fails in this subset.

35. 실제 중점 근사 평균Actual midpoint mean

500g구간 빈도(9,62,94,59,51,34,29,4)와 중점(2750,3250,…,6250)으로 평균을 근사하세요.

Approximate the mean from counts(9,62,94,59,51,34,29,4) and midpoints(2750,3250,…,6250) g.

풀이와 확인할 이유Solution and explanation

가중합1442000g을342로 나누어721000/171≈4216.374269g입니다. 원합1437000g과5000g 차이가 있습니다. 중점은 실제 구간 안 평균이라고 관측된 것이 아니므로 근사라고 표시합니다.

The midpoint total 1442000 g divided by 342 gives 721000/171≈4216.374269 g. It differs from actual total 1437000 g by 5000 g. Label the approximation.

36. 중점 오차의 상계Midpoint error bound

모든 원값이 폭500g구간 안에 있고 중점으로 바꾸면 평균오차의 보편상계와 실제오차를 구하세요. 실제 평균은239500/57, 근사는721000/171입니다.

For 500 g bins, find a bound on mean error after midpoint replacement and the actual difference between 239500/57 and 721000/171.

풀이와 확인할 이유Solution and explanation

각 대체오차가250g 이하이므로 평균오차 절댓값도250g 이하입니다. 실제 차이는2500/171≈14.619883g입니다. 상계가 실제오차와 같아야 하는 것은 아닙니다.

The universal bound is 250 g. The actual difference is 2500/171≈14.619883 g. A bound need not equal the realized error.

37. 성장률 평균과 복리Growth averages and compounding

가정 가격100→200→100에서 두 변화율의 산술평균과 동일 끝값을 주는 일정 복리율을 계산하세요.

For hypothetical price 100→200→100, compute arithmetic mean growth and the constant compounded rate with the same endpoint.

풀이와 확인할 이유Solution and explanation

변화율은+100%,−50%라 산술평균25%입니다. 성장배수 곱2·0.5=1이므로 일정연율은√1−1=0입니다. 산술평균 변화율과 끝값을 보존하는 복리율은 다른 요약입니다.

Arithmetic growth averages 25%, while factors 2 and 0.5 multiply to one, giving compounded rate zero. The summaries preserve different quantities.

38. 시간 순서를 없애면Removing time order

자료(1,2,10)과 역순(10,2,1)의 평균·중앙값·히스토그램은 같나요? 시간 추세도 같나요?

Compare(1,2,10) and reversed(10,2,1) in mean, median, histogram and trend.

풀이와 확인할 이유Solution and explanation

분포 요약은 순서와 무관해 같습니다. 평균13/3, 중앙값2이며 같은 구간 빈도를 가집니다. 하지만 시간 흐름은 상승과 하락으로 다릅니다. 분포 그림이 시간 정보를 보존하지 않음을 보여 줍니다.

Both have mean 13/3, median 2 and identical bin counts, but opposite time directions. Distribution summaries discard temporal order.

39. 실제 국가 중앙값Actual country median

16개국의 중앙 두 값이37048.4264001496과37976.6371788298이면 관습적 중앙값과 위치를 구하세요.

For 16 countries with central values 37048.4264001496 and 37976.6371788298, find the median and ranks.

풀이와 확인할 이유Solution and explanation

위치는8·9이고 평균은37512.5317894897입니다. 단위는2015불변USD/명입니다. 개인 소득 중앙값이나 국가 인구가중 중앙값으로 이름을 바꾸지 않습니다.

Use ranks 8 and 9, giving 37512.5317894897 constant 2015 US dollars per person. This is neither a personal-income median nor a population-weighted median.

40. 국가 가중치가 바뀌면Changing country weights

국가 균등 평균 31100.238572와 인구 가중 평균 15756.274457 중 하나가 잘못 계산됐다고 단정할 수 있나요?

Must either uniform-country mean 31100.238572 or population-weighted mean 15756.274457 be wrong?

풀이와 확인할 이유Solution and explanation

아닙니다. 국가를 동일하게 고르는 질문과 인구 비중으로 국가를 고르는 질문이 다릅니다. 함수값·선택 집합이 같아도 무게가 달라 기대값이 바뀝니다. 각 무게 정의와 원자료를 검산해야 합니다.

No. They use different selection weights on the same national indicators. Check each weighting definition rather than declaring a contradiction.

41. 원값 최빈값과 최고 구간Raw mode versus modal-bin midpoint

실제 최빈값 3800 g와 [3500,4000) 최고 빈도 구간의 중점 3750 g이 다르면 오류인가요?

Is it an error that actual mode 3800 g differs from midpoint 3750 g of the highest-count bin[3500,4000)?

풀이와 확인할 이유Solution and explanation

아닙니다. 3800 g은 정확값 빈도가 최고인 관측값이고 3750 g은 구간 표시용 중점입니다. 최고 막대는 구간 전체의 집계입니다. 둘을 같은 최빈값 정의로 부르지 않습니다.

No. One is an exact recorded-value mode; the other is a bin midpoint. The bin aggregates many values. These are different definitions.

42. 결측을 구간 0에 넣으면Missing masses in a zero bin

몸무게 결측 2개를 0 g로 채워 344개 히스토그램을 만들면 분포 설명은 어떻게 바뀌나요?

What changes if two missing masses become 0 g and a 344-value histogram is drawn?

풀이와 확인할 이유Solution and explanation

실제로 측정하지 않은 0 g 두 개를 추가해 왼쪽 분포와 분모를 바꿉니다. 원래 유효 342값의 분포와 다른 자료가 됩니다. 결측 빈도는 별도 표시하고 몸무게 구간에 측정값처럼 넣지 않습니다.

It adds two invented measurements and changes the left tail and denominator. Report missingness separately from the 342 observed-value distribution.

43. 실제 8구간의 검산Audit eight actual bins

실제 빈도 9,62,94,59,51,34,29,4의 합과 [3500,4000) 구간 비율을 구하세요.

Sum counts 9,62,94,59,51,34,29,4 and compute the [3500,4000) share.

풀이와 확인할 이유Solution and explanation

합은 342입니다. 해당 세 번째 구간 비율은 94/342=47/171≈0.274854입니다. 이 비율을 F(4000)−F(3500)으로 바로 바꾸면 끝점 포함이 달라질 수 있습니다. 구간 정의를 그대로 사용합니다.

The total is 342, and the third-bin share is 47/171≈0.274854. The expression F(4000)−F(3500) has different endpoint inclusion, so do not substitute it blindly.

44. 누적분포의 구간 끝CDF interval endpoints

CDF가 ≤를 뜻할 때 F(b)−F(a)는 [a,b)인가요, (a,b]인가요? [a,b) 비율은 어떻게 쓰나요?

For a≤-CDF, does F(b)−F(a) describe[a, b) or(a, b]? How is[a, b) written?

풀이와 확인할 이유Solution and explanation

차이는 a보다 크고 b 이하인 (a,b]입니다. [a,b)는 F(b−)−F(a−)로 써야 합니다. 여기 F(t−)는 t 미만인 값의 비율입니다. 동률·끝점 값이 있으면 두 비율이 다를 수 있습니다.

It describes(a, b]. Use F(b−)−F(a−) for[a, b), where left limits count strictly smaller values. Boundary atoms can make the shares differ.

45. 빈 선택과 한 개 값Empty data and a singleton

빈 자료와 한 개 값 {7}에서 빈도·CDF·평균·중앙값·분위수 상태를 구별하세요.

Compare counts, CDF, mean, median and quantiles for empty data and{7}.

풀이와 확인할 이유Solution and explanation

빈 자료는 빈도 0이지만 나머지 정의는 미정의입니다. {7}의 평균·중앙값·표시 분위수는 모두 7입니다. CDF는 t<7에서 0, t≥7에서 1입니다. 빈 상태를 숫자 0으로 채우지 않습니다.

Empty data have zero counts but undefined CDF and centers. The singleton has every reported center and quantile 7, and CDF zero below 7, one at or above 7.

46. 선택 심화: 가중중앙값Optional: weighted median

값 1,2,10의 무게 1,1,3에서 절댓값 가중합을 최소화하는 중심을 구하고 반무게 조건으로 검산하세요.

For values 1,2,10 with weights 1,1,3, find the absolute-weighted-loss minimizer and check half-mass conditions.

풀이와 확인할 이유Solution and explanation

총무게 5의 절반 2.5보다 값 10의 무게 3이 큽니다. c=10에서는 왼쪽 무게 2, 오른쪽 0으로 각각 반 이하입니다. 다른 위치에서는 10쪽에 반 초과 무게가 남아 그쪽으로 이동하면 손실이 줄어듭니다. 따라서 가중중앙값은 유일하게 10입니다.

Total mass is 5, and mass 3 at 10 exceeds half. At 10, both strict-side masses are at most 2.5. Any other position leaves more than half the mass toward 10, so moving that way reduces loss. The unique weighted median is 10.

47. 평균과 중앙값 최적화의 차이Mean and median optimization differ

자료 (1,2,10,20)에서 제곱손실 최소와 절대손실 최소 집합을 구별하세요.

For(1,2,10,20), contrast squared-loss and absolute-loss minimizers.

풀이와 확인할 이유Solution and explanation

평균은 33/4=8.25라 제곱손실의 유일한 최소입니다. 절대손실은 [2,10]의 모든 점에서 최소입니다. 같은 최적화라는 말이어도 목적함수와 유일성이 달라집니다. 대표 중앙값 6은 그 집합의 중점입니다.

The unique squared-loss minimizer is mean 8.25. Absolute loss is minimized by every point in [2,10], whose conventional midpoint median is 6. Loss choice changes uniqueness and the answer.

48. 그래프만으로 일반화Generalizing from a graph

실제 342몸무게 히스토그램이 종처럼 보이면 모든 펭귄이 정규분포·독립·확률표집이라고 할 수 있나요?

Does a bell-like 342-mass histogram establish normality, independence and probability sampling of all penguins?

풀이와 확인할 이유Solution and explanation

아닙니다. 유한 그림은 구간 선택에 영향을 받고 여러 종의 혼합입니다. 정규 모형·독립성·표집 대표성은 각각 다른 근거와 검토가 필요합니다. 관측분포 기술과 모집단 모형 추론을 나눕니다.

No. The finite picture depends on bins and mixes species. Normal modeling, independence and sampling representation each require separate evidence.

49. 합계 보존과 순위 보존Total-preserving and rank-based centers

평균과 중앙값을 각각 “총량을 균등 분배한 대표”와 “순서의 가운데 대표”로 설명하고 그림을 함께 보는 이유를 쓰세요.

Explain mean as equal redistribution and median as a central rank, then why graphs remain necessary.

풀이와 확인할 이유Solution and explanation

평균은 n배하면 원합을 회복하고 제곱거리 합을 최소화합니다. 관습적 중앙값은 중앙 순서통계량의 대표이며 절대거리 최소 집합에 속합니다. 두 수만으로 꼬리·혼합·틈·시간 순서를 모두 알 수 없으므로 원값과 분포 그림을 함께 봅니다.

The mean preserves the total and minimizes squared deviations. The conventional median represents central order statistics and belongs to the absolute-loss minimizing set. Two centers do not recover tails, mixtures, gaps or time order.

50. 종합 검토Integrated audit

보고서가 중앙값 차이를 평균 변화라고 부르고, 폭이 다른 히스토그램의 높이를 비율로 읽고, 빈 자료 평균을 0으로 채웠습니다. 바로잡으세요.

A report calls median difference mean change, reads unequal-width histogram heights as shares, and fills an empty mean with zero. Correct it.

풀이와 확인할 이유Solution and explanation

중앙값 차이·변화 중앙값·평균 변화를 정의와 짝지은 키로 구별합니다. 폭이 다르면 밀도 높이×폭이 구간 비율인지 확인하고 축을 명시합니다. 빈 자료는 유효 n=0과 미정의 중심을 표시합니다. 모든 수치에 단위·분모·가중·분위수 관례를 붙여 다시 검산합니다.

Separate difference of medians, median changes and mean changes using matched keys. With unequal bins, use density area for shares and label axes. Show empty centers as undefined. Record units, denominators, weights and quantile conventions.

자료와 출처Data and sources

실습에 추가한 실제 입력과 출처Additional observed lab inputs and provenance

실제 자료 사례Actual-data cases · 원자료·단위·결측·변환·출처Inputs, units, missingness, transformations and sources

자료별 확보일·원행 식별·단위·이용 조건은 출처 기록을 확인하세요. 학습 사본은 제공처의 현재 최신 자료와 다를 수 있습니다.Consult each source record for retrieval dates, row identifiers, units and terms. Teaching copies can differ from current provider releases.

자료사전·출처·이용 조건Data dictionary, sources and terms