분산·표준편차·공분산·상관Variance, standard deviation, covariance and correlation
같은 중심의 다른 흩어짐에서 집단 분해·단위·수치 경계와 실제 상관까지From spread around equal centers to group decomposition, units, numerical boundaries and actual correlation
실습 6종 · 풀이 포함 연습문제 50개6 labs · 50 exercises with solutions
기초Foundations
1. 중심이 같아도 흩어짐과 함께 움직임은 다르다1. Equal centers can hide different spread and joint movement
가정 자료 (4,4,4,4)와 (1,2,3,10)은 평균이 모두 4입니다. 하지만 한쪽은 차이가 없고 다른 쪽은 멀리 떨어진 값이 있습니다. 이제 중심에서 얼마나 떨어지는지, 두 변수가 어떤 기록에서 함께 커지는지를 구별해 측정합니다.
분산·표준편차는 한 변수의 흩어짐, 공분산·상관은 짝지은 두 변수의 함께 움직임을 요약합니다. 실제 펭귄 날개 길이·몸무게 342쌍, 선택된 16개국 GDPpc·기대수명, 기업 5품목의 두 해 매출을 사용합니다.
Hypothetical data (4,4,4,4) and (1,2,3,10) share mean four but differ in spread. Next distinguish distance from a center from joint movement across paired observations.
Variance and standard deviation describe one variable; covariance and correlation describe paired variables. Use actual penguin flipper–mass pairs, country GDPpc–life-expectancy pairs and matched company categories.
기초Foundations
2. 편차는 어떤 중심을 뺐는지부터 정한다2. A deviation depends on the center being subtracted
값 xᵢ에서 중심 c를 뺀 dᵢ=xᵢ−c를 편차라고 부릅니다. 양수는 중심보다 큼, 음수는 작음입니다. 중심 c가 평균 x̄일 때 편차 합은 0이지만 임의 c에서는 n(x̄−c)입니다.
di=xi−c,i∑(xi−c)=n(xˉ−c),i∑(xi−xˉ)=0
편차 합이 0이면 흩어짐이 없다는 뜻은 아닙니다. (1,2,3,10)의 평균 4에서 편차는 (−3,−2,−1,6)이고 합은 0입니다. 크기를 요약하려면 절댓값이나 제곱처럼 부호 상쇄를 막는 연산이 필요합니다.
평균에서 뺀 잔차가 0합이라는 대수적 성질과 확률모형 오차의 기대값 0은 다릅니다. 실제 기록의 편차를 계산했다고 모집단 외생성이나 독립성을 증명한 것은 아닙니다.
A deviation is xᵢ−c. Its sign compares a value with the chosen center. Only centering at the sample mean forces the sum to zero.
di=xi−c,i∑(xi−c)=n(xˉ−c),i∑(xi−xˉ)=0
For (1,2,3,10), deviations from four are (−3,−2,−1,6), summing to zero despite substantial spread. Absolute values or squares prevent cancellation.
Finite residual sums are algebraic identities, not proof that a population error has conditional mean zero or independence.
기초Foundations
3. 편차 실습: 중심을 옮기면 제곱합이 어떻게 변하나3. Deviation lab: move the center and compare squared totals
실제 몸무게 가용 기록을 고르고 가정 중심 c를 움직입니다. 원측정값·편차·제곱·합계를 나란히 읽으세요. c를 바꾸는 것은 실제 펭귄 몸무게를 바꾸는 실험이 아닙니다.
SSE(c)=SSE(xˉ)+n(c−xˉ)2
평균에서 제곱합이 가장 작다는 앞 장 항등식을 다시 확인합니다. 단위가 g이면 편차는 g,제곱합은 g²입니다. kg로 표시하면 편차는 1/1000배, 제곱합은 1/10⁶배가 됩니다.
표시된 반올림 편차를 손으로 더하면 아주 작은 합이 남을 수 있습니다. 원정밀 계산의 대수적 항등식과 화면 반올림을 구별하고 원값에서 계산한 합계를 기준으로 검산합니다.
Select actual available mass records and move a hypothetical center. Compare observations, deviations, squares and totals. Changing the center does not change measured penguins.
SSE(c)=SSE(xˉ)+n(c−xˉ)2
Deviations have mass units; squared totals have squared units. Converting grams to kilograms scales them by 1/1000 and 1/10⁶ respectively.
Adding rounded displayed deviations can leave a small remainder. Audit unrounded calculations separately from display rounding.
기초Foundations
4. 범위는 양끝만 보며 가운데를 설명하지 못한다4. The range sees only two extremes
범위는 최댓값−최솟값입니다. 실제 펭귄 몸무게의 범위를 계산하려면 같은 유효 342값의 양끝을 사용합니다. 단위는 몸무게와 같은 g입니다. 하나의 극단값이 바뀌면 범위도 크게 바뀔 수 있습니다.
가정 자료 (0,0,0,10)과 (0,5,5,10)은 범위가 모두 10입니다. 가운데 값들의 배치는 다릅니다. 범위가 같다는 이유로 변동의 모든 측면이 같다고 부르지 않습니다.
표본 수가 늘면 드문 끝값을 새로 만나 범위가 커질 수 있습니다. 다른 크기의 자료에서 범위만 비교할 때는 포함 대상·관측 수·측정 해상도를 함께 확인합니다.
The range is maximum minus minimum, in the variable’s original units. One changed extreme can change it substantially.
Hypothetical (0,0,0,10) and (0,5,5,10) share range ten but differ internally. Range alone does not characterize all spread.
Larger datasets can encounter rarer extremes. Compare ranges with sample sizes, inclusion rules and measurement resolution visible.
기초Foundations
5. 평균절대편차와 중앙절대편차는 다른 계산5. Average absolute deviation and median absolute deviation differ
평균절대편차는 평균으로부터의 절댓값 거리를 평균냅니다. 중앙절대편차 MAD는 중앙값으로부터의 절댓값 거리들의 중앙값입니다. 이름이 비슷해도 중심과 마지막 요약 연산이 다릅니다.
AAD=n1i∑∣xi−xˉ∣,MAD=medi∣xi−x∣
가정 자료 (1,2,3,10)에서 평균 4의 절댓값 거리는 (3,2,1,6)이므로 AAD=3입니다. 중앙값 2.5에서 거리는 (1.5,0.5,0.5,7.5)이고 정렬 중간 평균은 1이므로 MAD=1입니다.
여기 MAD는 보정 배수를 곱하지 않은 원정의입니다. 일부 소프트웨어는 정규분포 척도에 맞추는 상수를 기본 적용하므로 옵션을 확인합니다. MAD가 0이어도 모든 값이 같은 것은 아닐 수 있습니다. 동률이 많으면 절반 이상이 중앙값에 놓일 수 있습니다.
AAD averages absolute deviations from the mean. MAD takes the median of absolute deviations from the median. Both the center and final operation differ.
AAD=n1i∑∣xi−xˉ∣,MAD=medi∣xi−x∣
For (1,2,3,10), AAD is three and raw MAD is one. We apply no normal-consistency multiplier; software defaults can differ.
A zero MAD need not mean every value is identical: enough tied central values can produce it.
기초Foundations
6. 사분위범위와 상자그림은 분위수 관례를 먼저6. Quartile ranges and boxplots require a quantile convention
사분위범위 IQR=Q₀.₇₅−Q₀.₂₅는 중앙 쪽 값들의 폭을 요약합니다. 앞 장의 역경험 CDF 관례를 쓰면 (1,2,3,10)의 Q₀.₂₅=1, Q₀.₇₅=3, IQR=2입니다. 보간 관례를 바꾸면 숫자가 달라질 수 있습니다.
상자그림의 1.5 IQR 울타리는 Q₁−1.5 IQR와 Q₃+1.5 IQR입니다. 이 예에서는 −2와 6이라 값 10을 표시합니다. 이는 탐색 표시 규칙이지 오류·사기·삭제 필요의 증명이 아닙니다.
상자그림 수염은 흔히 울타리 안의 가장 먼 실제값까지 그리지만 구현마다 다를 수 있습니다. Q1·Q3·수염·표시된 바깥점의 정의를 문서에 남깁니다. 실제 모양·동률·혼합을 상자 하나만으로 다 알 수는 없습니다.
IQR is Q0.75−Q0.25. Under the inverse-ECDF convention, (1,2,3,10) gives quartiles one and three, hence IQR two. Interpolated conventions can differ.
The exploratory 1.5-IQR fences are −2 and six here, flagging ten. A flag does not prove error or justify deletion.
Whisker implementations also vary. Record quartile and whisker definitions, and retain distribution plots for ties and mixtures.
기초Foundations
7. 기술 분산: 평균에서 제곱거리의 관측 평균7. Descriptive variance averages squared distances from the observed mean
유효값 n≥1개에 같은 무게를 주면 기술 분산 v₀=(1/n)Σ(xᵢ−x̄)²입니다. 이 n분모는 현재 유한 자료의 경험분포를 요약합니다. 모집단 모수를 추정할 때 쓰는 n−1 식과 목적을 먼저 구별합니다.
v0=nSxx,Sxx=i=1∑n(xi−xˉ)2≥0
제곱은 음·양 편차 상쇄를 막고 큰 거리를 더 크게 반영합니다. v₀=0이면 모든 제곱 편차가 0이므로 모든 값이 평균과 같습니다. 한 개 값의 기술 분산도 0입니다. 빈 자료의 평균·분산은 정의하지 않습니다.
임의 분포의 평균이 모든 점과 실제로 다를 수 있듯 분산의 숫자도 관측값 하나일 필요는 없습니다. 단위와 값의 해석을 함께 확인합니다.
For n≥1 equally weighted valid values, v 0=(1/n)Σ(xᵢ−x̄)² describes the empirical distribution. Distinguish this purpose from estimating a population parameter with an n−1 formula.
v0=nSxx,Sxx=i=1∑n(xi−xˉ)2≥0
Zero variance means every squared deviation is zero. A singleton has descriptive variance zero; empty data have undefined mean and variance.
The result is a squared-unit summary, not necessarily one of the observed values.
기초Foundations
8. 작은 표로 분산을 끝까지 계산하기8. Work through variance in a small table
가정 자료 (1,2,3,10)의 평균은 4입니다. 편차 (−3,−2,−1,6),제곱 (9,4,1,36),제곱합 50을 차례로 만듭니다. 같은 자료에서 합계와 분모를 따로 검산하는 습관을 반복합니다.
Sxx=9+4+1+36=50,v0=50/4=12.5,s2=50/3
마지막 s²는 n−1 분모로 계산한 식의 값입니다. 12.5와 50/3 중 하나가 산술 오류인 것이 아닙니다. 현재 경험분포의 기술인가, 특정 확률모형의 모수 추정인가에 따라 어떤 이름과 해석을 붙일지 정합니다.
평균의 반올림값을 먼저 빼면 제곱합이 달라질 수 있습니다. 이 작은 정수 예에서는 정확히 계산할 수 있고 실제 자료에서는 충분한 정밀도를 유지합니다.
For (1,2,3,10), mean four gives deviations (−3,−2,−1,6), squares (9,4,1,36) and total fifty.
Sxx=9+4+1+36=50,v0=50/4=12.5,s2=50/3
The n and n−1 formulas have different definitions, not conflicting arithmetic. Their interpretation depends on the descriptive or inferential target.
Avoid first rounding the mean before squaring deviations; preserve sufficient precision.
기초Foundations
9. 표준편차는 분산의 제곱근으로 단위를 되돌린다9. Standard deviation restores the variable’s units
표준편차는 선택한 분산의 비음수 제곱근입니다. g²의 분산을 제곱근하면 g가 되어 원래 측정 척도에서 흩어짐을 말할 수 있습니다. 이름을 줄여 SD라고 쓰기도 합니다.
σempirical=v0,s=s2
실제 342개 몸무게의 n분모 분산은 약 641250.577101 g²,표준편차는 약 800.781229 g입니다. kg로 바꾸면 분산 약 0.641250577 kg²,SD 약 0.800781229 kg입니다. 분산을 1000으로만 나누면 단위 변환을 틀린 것입니다.
SD는 값들의 전형적 제곱거리 척도이며 평균으로부터의 평균 절대거리와 같지 않습니다. SD만으로 어떤 구간에 정확히 몇 퍼센트가 들어가는지는 정해지지 않습니다.
SD is the nonnegative square root of the selected variance, restoring original units.
σempirical=v0,s=s2
Actual mass descriptive variance is about 641250.577101 g² and SD 800.781229 g. In kilograms these become 0.641250577 kg² and 0.800781229 kg.
SD differs from average absolute deviation and does not alone determine exact proportions inside a chosen interval.
기초Foundations
10. 분산 실습: 분모·단위·빈 자료를 함께 확인10. Variance lab: inspect denominators, units and empty states
실제 몸무게와 작은 가정 자료를 선택하고 n분모·n−1분모를 비교합니다. 원래 제곱합은 같고 분모가 달라 결과가 바뀝니다. 단위를 바꾸면 평균·SD·분산이 서로 어떤 배율로 변하는지도 확인하세요.
빈 자료는 평균·분산이 미정의입니다. 한 값이면 n분모 분산 0이지만 n−1분모는 0으로 나누므로 미정의입니다. 모든 값이 같고 n≥2이면 두 분모의 분산이 모두 0입니다.
실습의 ddof는 n에서 빼는 수라는 소프트웨어 표기입니다. ddof=0 또는 1의 선택이 자동으로 자료의 독립성이나 원모집단 대표성을 보증하지 않습니다.
Compare n and n−1 denominators on actual masses and small hypothetical data. The centered sum stays fixed while the denominator changes. Check unit conversions for mean, SD and variance separately.
Empty data are undefined; a singleton has descriptive variance zero but undefined n−1 variance. Constant data with n≥2 have zero under both formulas.
The software label ddof means how much is subtracted from n. Selecting it does not establish independence or representation.
기초Foundations
11. n−1은 다른 목표와 가정을 가진 분모11. The n−1 denominator serves an inferential target under assumptions
n≥2에서 s²=Sxx/(n−1)이라 정의합니다. 같은 자료의 v₀와 s²는 s²=n·v₀/(n−1)로 연결됩니다. 고정 관측의 경험분산에는 n분모가 맞고, 특정 모집단 분산을 추정할 때 n−1이 유용한 성질을 가질 수 있습니다.
s2=n−1Sxx=n−1nv0(n≥2)
표본평균을 뺀 n개 편차는 합이 0이라 마지막 하나가 나머지로 정해집니다. 이것이 자유도 n−1이라는 기하적 직관입니다. 하지만 자유도라는 말만으로 모든 표집 설계의 불편성이 증명되지는 않습니다. 다음 절에서 확률 가정을 붙여 계산합니다.
R의 기본 var·cov는 n−1 분모를 사용합니다. 이 장의 실제 자료 표는 우선 ddof=0 기술량을 기준으로 제시하고, 실습에서 ddof=1 값을 함께 보여 줍니다. 이름과 분모를 명시하면 둘을 모순으로 오해하지 않습니다.
For n≥2, define s²=Sxx/(n−1), so s²=n·v 0/(n−1). Empirical description and estimating a population parameter are distinct targets.
s2=n−1Sxx=n−1nv0(n≥2)
Mean-centered deviations sum to zero, leaving n−1 freely chosen coordinates. This degrees-of-freedom intuition does not alone prove unbiasedness under every design.
R’s default var and cov use n−1. Our actual-data tables first use descriptive ddof 0 and explicitly compare ddof 1.
학부 심화 · 선택Advanced undergraduate · optional
12. 선택 심화: iid·유한분산에서 불편성을 증명12. Optional proof: unbiasedness under iid finite-variance sampling
이 절만은 고정 숫자가 아니라 같은 모집단에서 독립·동일분포로 얻는 확률변수 X₁,…,Xₙ을 가정합니다. n≥2, 평균 μ,유한 분산 σ²를 갖습니다. 독립성으로 Var(X̄)=σ²/n이므로 다음 항등식의 기대값을 구할 수 있습니다.
i∑(Xi−Xˉ)2=i∑(Xi−μ)2−n(Xˉ−μ)2
E[Sxx]=nσ2−nnσ2=(n−1)σ2,E[s2]=σ2
불편성은 반복 추출의 평균에서 맞는다는 뜻이지 한 번 계산한 s²가 참분산과 정확히 같다는 뜻이 아닙니다. 또한 s=√s²도 불편하다는 결론은 자동으로 나오지 않습니다. 제곱근은 기대값과 일반적으로 교환하지 않습니다.
반례로 모든 Xᵢ가 같은 한 확률값 Z의 복제라면 각자의 분산이 양수여도 표본 안 Sxx는 항상 0입니다. 독립성 가정이 빠졌습니다. 유한 모집단 비복원 설계에서는 모수와 설계의 분산 정의를 별도로 다룹니다. 기대값·분산의 확률 법칙은 통계학 7장에서 다시 자세히 유도합니다.
Assume n≥2 iid random variables with common mean μ and finite variance σ². Independence gives Var(X̄)=σ²/n. Apply expectation to the identity.
i∑(Xi−Xˉ)2=i∑(Xi−μ)2−n(Xˉ−μ)2
E[Sxx]=nσ2−nnσ2=(n−1)σ2,E[s2]=σ2
Unbiasedness is an expectation across repeated samples, not exactness in one sample. It does not automatically make the square-root SD estimator unbiased.
If every Xᵢ duplicates one random Z, the within-sample sum is always zero despite positive marginal variance. Independence is absent. Without-replacement finite-population designs require their own target conventions. Chapter 7 develops the probability rules.
기초Foundations
13. 표준편차 SD와 표준오차 SE는 다른 대상의 변동13. SD and SE describe variability of different objects
SD는 관측값이나 모집단 값이 얼마나 흩어졌는지의 척도입니다. SE는 표본평균 같은 추정량이 반복 표집에서 얼마나 달라지는지의 표준편차입니다. 데이터의 변동과 계산한 추정량의 불확실성을 혼동하지 않습니다.
SD(Xi)=σ,SE(Xˉ)=nσunder iid finite variance
iid 모형에서 σ를 모르면 s/√n을 추정 SE로 쓸 수 있습니다. 군집·시간 의존·불균등 설계에서는 같은 식을 자동 적용하지 않습니다. 한 가구의 분 기록 1440개를 독립 가구 1440개로 세면 단위를 잘못 잡습니다.
표본 수가 커져 평균의 SE가 줄 수 있어도 원자료 SD가 반드시 작아지는 것은 아닙니다. 결과에 ±숫자를 붙일 때 SD·SE·신뢰구간·예측구간 중 무엇인지 이름과 계산 가정을 같이 씁니다. 신뢰·예측 구간은 11장에서 배웁니다.
SD measures spread of values; SE is the standard deviation of an estimator across repeated sampling.
SD(Xi)=σ,SE(Xˉ)=nσunder iid finite variance
Estimated s/√n relies on that sampling model; clustering, time dependence and complex designs need separate treatment.
A smaller mean SE with more observations does not require smaller raw-data SD. Label whether an error bar is SD, SE, a confidence interval or a prediction interval.
학부 연결 · 선택Undergraduate bridge · optional
14. 평균±1 SD에 항상 68%가 들어가지는 않는다14. Mean±one SD does not always contain 68% of observations
정규분포 모형에서는 평균±1표준편차 확률이 약 68.27%입니다. 하지만 모든 자료의 정의상 성질이 아닙니다. 실제 16개국 GDPpc에서 n분모 SD를 써서 평균±SD 안에 있는 국가는 9개, 비율은 9/16=56.25%입니다.
더 일반적인 상계는 양의 기술 분산 v₀와 k>0에서 얻을 수 있습니다. |xᵢ−x̄|≥k√v₀인 값이 m개라면 제곱합 nv₀≥m·k²v₀이므로 m/n≤1/k²입니다. 유용한 비자명 상계는 보통 k>1에서 읽습니다.
n#{i:∣xi−xˉ∣≥kv0}≤k21(v0>0)
이는 경험분포의 Chebyshev 부등식입니다. k=2이면 적어도 75%가 엄격한 2 SD 안쪽에 있습니다. 실제 비율이 반드시 75%라는 말은 아닙니다. v₀=0인 상수 자료는 나누지 말고 별도로 다룹니다.
A normal model places about 68.27%within one SD, but this is not a definition applying to every dataset. Actual country GDPpc has 9/16=56.25%within its descriptive one-SD interval.
If m values satisfy |xᵢ−x̄|≥k√v 0 with v 0> 0, their squared deviations contribute at least mk²v 0 to total nv 0.
n#{i:∣xi−xˉ∣≥kv0}≤k21(v0>0)
This empirical Chebyshev bound gives at least 75%strictly inside two SDs, not exactly 75%. Handle zero-variance constants separately.
기초Foundations
15. 이동은 분산을 보존하고 배율은 제곱으로 바꾼다15. Shifts preserve variance while scaling squares it
모든 값에 yᵢ=axᵢ+b를 적용하면 평균도 a·x̄+b라 편차는 a(xᵢ−x̄)입니다. 제곱을 더하면 분산은 a²배, SD는 |a|배가 됩니다. b는 중심을 옮기지만 편차에는 남지 않습니다.
v0(ax+b)=a2v0(x),SD(ax+b)=∣a∣SD(x)
a=0이면 모든 변환값이 b라 분산 0입니다. 음의 a는 순서를 뒤집지만 분산은 음수가 되지 않습니다. g→kg에서 a=0.001이므로 분산 10⁻⁶배, SD 10⁻³배를 다시 확인합니다.
변동계수 SD/평균은 평균이 양수인 의미 있는 비율척도에서 비교할 때 해석할 수 있습니다. 영점이 임의인 섭씨나 평균이 0에 가까운 자료에 같은 숫자 비율을 조용히 적용하면 오해하기 쉽습니다.
Under y=ax+b, deviations become a (x−mean), so variance scales by a² and SD by |a|. The shift disappears.
v0(ax+b)=a2v0(x),SD(ax+b)=∣a∣SD(x)
Zero a makes constants; negative a reverses order but cannot make variance negative. Gram-to-kilogram scaling gives factors 10⁻⁶ and 10⁻³.
SD/mean comparisons require a meaningful ratio scale and a suitable nonzero positive mean; arbitrary zeros or near-zero means complicate interpretation.
기초Foundations
16. z점수는 선택한 중심·척도로 거리를 표현한다16. A z-score expresses distance in the chosen SD units
양의 SD로 나눈 zᵢ=(xᵢ−평균)/SD는 무차원입니다. “평균보다 2 SD 큼”처럼 단위가 다른 값을 상대적 위치로 표현할 수 있습니다. 하지만 다른 모집단·측정의 z가 같다고 실제 의미가 같아지는 것은 아닙니다.
zi=v0xi−xˉ(v0>0),zˉ=0,n1i∑zi2=1
n분모 기술 SD로 표준화하면 경험분산이 1입니다. n−1 SD를 쓰면 n−1 식의 표준화 분산이 1이고 n분모 분산은 (n−1)/n입니다. 어떤 표준화를 사용했는지 명시합니다.
상수 변수는 SD=0이므로 z를 계산하지 않습니다. 높은 z가 자동으로 오류·원인·예외 처리 대상이라는 뜻도 아닙니다. 분포·표본구성·측정·추론 목적을 함께 읽습니다.
Subtract a chosen mean and divide by positive SD to obtain dimensionless relative distance. Equal z-scores across different targets need not have identical practical meaning.
zi=v0xi−xˉ(v0>0),zˉ=0,n1i∑zi2=1
Descriptive-SD standardization gives empirical variance one. Using n−1 SD instead gives n−1 variance one and descriptive variance(n−1)/n.
Constant variables have undefined z-scores. A high z is not automatic evidence of error or a deletion rule.
학부 연결 · 선택Undergraduate bridge · optional
17. 같은 대수식도 컴퓨터에서는 상쇄오차가 다르다17. Algebraically equal variance formulas can behave differently numerically
대수적으로 v₀=평균(x²)−평균(x)²입니다. 그러나 큰 수 두 개가 거의 같으면 빼기에서 작은 차이 정보가 사라질 수 있습니다. 원값에서 평균을 뺀 편차 제곱을 합하는 중심화 계산을 기본으로 사용합니다.
가정 입력 (10¹⁶,10¹⁶+2,10¹⁶+4)의 정확한 기술 분산은 8/3입니다. 일반적인 binary64 계산에서 평균 제곱 차 공식은 0이 나올 수 있지만, 중심화 제곱합은 약 2.6666666667을 얻습니다. 수학적 정의가 0으로 바뀐 것이 아니라 계산 경로가 정보를 잃은 것입니다.
더 안정적인 누적 알고리즘도 있지만 어떤 방법도 입력 단계에서 이미 사라진 차이를 되찾지는 못합니다. 허용 입력 범위·정밀도·원값 보존을 12장의 수치 오차와 연결해 확인하세요. 이 교차참조는 수리기초 12장을 뜻합니다.
Variance algebraically equals mean(x²)−mean(x)², but subtracting nearby large terms can destroy a small variance. Use centered squared deviations as the baseline.
Hypothetical inputs(10¹⁶,10¹⁶+2,10¹⁶+4) have exact variance 8/3. A typical binary 64 shortcut can return zero while centered calculation returns about 2.6666666667.
Stable online methods also have finite-precision limits and cannot recover distinctions already lost in input. Revisit numerical error in Mathematical Foundations Chapter 12.
기초Foundations
18. 두 변수는 같은 기록끼리 짝지어야 한다18. Pair measurements from the same observational record
날개 길이 x와 몸무게 y의 관계를 보려면 두 값이 있는 같은 기록을 사용합니다. x열을 따로 정렬하고 y열도 따로 정렬한 뒤 짝지으면 원래 관계를 지우고 새 관계를 만들어 버립니다. 표의 키가 중요한 이유입니다.
실제 펭귄은 두 열 완전 342쌍을 사용합니다. sex가 필요한 질문이 아니므로 그 결측으로 추가 삭제하지 않습니다. 두 변수의 평균·분산·공분산은 모두 이 같은 집합에서 계산합니다.
실제 기업은 같은 품목의 FY2023·FY2024를 짝짓습니다. 총계나 품목 이름이 비슷하다고 순서가 같은지 추정하지 말고 키와 범주 정의를 확인합니다. 쌍의 수와 단위의 독립성은 다시 별개입니다.
Pair flipper length and mass from the same record. Sorting each column independently destroys observed pairings and can fabricate a relationship.
Use 342 complete penguin pairs without unnecessary sex filtering. Compute every marginal and joint summary on that same set.
Match company fiscal years by category keys rather than assumed order. Paired-record counts still do not establish independence.
기초Foundations
19. 공분산: 두 편차의 곱을 평균낸 값19. Covariance averages products of paired centered deviations
x가 자기 평균보다 크고 y도 자기 평균보다 크면 편차 곱은 양수입니다. 둘 다 작아도 양수입니다. 하나는 크고 하나는 작으면 음수입니다. 같은 쪽으로 치우친 기록이 얼마나 기여하는지 합치면 기술 공분산을 얻습니다.
Sxy=i=1∑n(xi−xˉ)(yi−yˉ),c0=nSxy(n≥1)
공분산 단위는 x단위×y단위입니다. 펭귄에서는 mm·g입니다. 숫자가 크다고 서로 다른 단위의 다른 연구보다 관계가 더 강하다고 직접 비교할 수 없습니다. 단위를 지우는 상관계수는 뒤에서 정의합니다.
같은 변수와의 공분산은 그 변수의 분산입니다. 공분산은 x와 y를 바꾸어도 같고 양수·0·음수가 될 수 있습니다. 한 변수라도 상수이면 c₀=0이지만, 이때 상관은 분모 0이라 별도입니다.
Deviation products are positive when both variables lie on the same side of their means and negative on opposite sides. Average these contributions to describe covariance.
Sxy=i=1∑n(xi−xˉ)(yi−yˉ),c0=nSxy(n≥1)
Units multiply: millimeters times grams here. Numerical covariance magnitudes cannot be compared across arbitrary units as a universal strength score.
Covariance with itself is variance, and swapping variables preserves it. A constant variable gives covariance zero but undefined correlation.
기초Foundations
20. 공분산 실습: 사분면 기여와 단위를 함께20. Covariance lab: inspect centered-quadrant contributions and units
실제 날개·몸무게 산점도에서 두 평균선을 그립니다. 평균에서의 가로·세로 편차 곱을 기록별로 확인하고 양·음 기여를 합칩니다. 원점에서의 곱 xy와 중심화 곱 (x−x̄)(y−ȳ)를 혼동하지 않습니다.
전체 342쌍의 기술 공분산은 약 9795.689699 mm·g입니다. 몸무게를 kg로 쓰면 약 9.795689699 mm·kg로 줄어듭니다. 날개도 cm로 바꾸면 추가로 1/10배입니다. 같은 실제 관계를 다른 숫자와 단위로 표현한 것입니다.
n−1 분모를 선택하면 같은 Sxy를 n−1로 나눕니다. 공분산과 두 분산을 같은 완전쌍·같은 분모로 계산하면 상관의 분모 계수는 소거됩니다. 다른 집합·분모를 섞어 계산한 비율은 같은 상관 공식이 아닙니다.
Draw mean lines on actual flipper–mass scatterplots and inspect each centered product. Do not replace centered products with raw xy.
Actual descriptive covariance is about 9795.689699 mm·g, or 9.795689699 mm·kg. Converting flipper length to centimeters introduces another 1/10 factor.
Using n−1 changes the common covariance denominator. If both variances and covariance use the same paired data and divisor, the divisor cancels from correlation.
기초Foundations
21. 공분산은 이동에 불변이고 두 배율의 곱으로 변한다21. Covariance is shift-invariant and scales by both multipliers
u=ax+b,v=cy+d이면 중심화 후 편차는 a(x−x̄),c(y−ȳ)입니다. 따라서 공분산은 ac배가 됩니다. 한 변수만 부호를 뒤집으면 공분산 부호가 바뀌고, 둘 다 뒤집으면 원부호로 돌아갑니다.
Cov0(ax+b,cy+d)=acCov0(x,y)
b,d 같은 기준점 이동은 편차에서 사라집니다. 하지만 원벡터 내적 Σxy나 원점 기준 코사인은 일반적으로 이동에 불변이 아닙니다. 기업의 두 연도 매출에서 상관과 코사인이 비슷해도 정의가 다른 이유입니다.
이 단위 변환 성질은 모형의 원인 관계를 바꾸지 않고 계산 표현을 바꿉니다. 공분산이 1000배 커졌다는 사실만 보고 현실의 관계가 1000배 강해졌다고 해석하지 않습니다.
Centered deviations of ax+b and cy+d scale by a and c. Their covariance therefore scales by ac, with sign changes determined by the product.
Cov0(ax+b,cy+d)=acCov0(x,y)
Shifts disappear from covariance but not generally from raw dot products or uncentered cosine similarity.
Unit-driven magnitude changes do not indicate stronger causal or substantive relationships.
학부 연결 · 선택Undergraduate bridge · optional
22. 합의 분산에는 공분산 항이 남는다22. Variance of a sum includes covariance
같은 기록의 zᵢ=xᵢ+yᵢ를 만들면 중심화 편차도 두 편차의 합입니다. 제곱을 전개하면 각각의 제곱과 두 배 교차곱이 생깁니다. 같은 n분모로 평균내어 다음 항등식을 얻습니다.
Var0(x+y)=Var0(x)+Var0(y)+2Cov0(x,y)
이 식 자체에는 독립성 가정이 없습니다. 공분산이 0일 때만 두 분산의 합으로 줄어듭니다. y=x이면 합 2x의 분산은 4Var(x)이고, y=−x이면 합의 분산은 0입니다.
단위가 다른 x,y를 물리량으로 더하려면 그 덧셈이 의미 있는지 먼저 확인합니다. 날개 mm와 몸무게 g를 그대로 더한 값은 수학적 숫자 합은 될 수 있어도 합쳐진 물리 측정으로 해석할 수 없습니다.
Expand the square of the summed centered deviations to obtain the descriptive identity on the same records and denominator.
Var0(x+y)=Var0(x)+Var0(y)+2Cov0(x,y)
No independence assumption is needed for the identity. If y=x, the result is 4 Var(x); if y=−x, it is zero.
Adding different physical units requires a meaningful transformation; millimeters plus grams are not a combined physical measurement.
기초Foundations
23. Pearson 상관은 두 양의 SD로 나눈 공분산23. Pearson correlation divides covariance by two positive SDs
두 변수가 모두 비상수여서 Sxx>0, Syy>0일 때 r=Sxy/√(SxxSyy)로 정의합니다. mm·g 같은 단위가 분모와 소거되어 무차원이 됩니다. 편차 벡터 사이 각도의 코사인으로도 읽을 수 있습니다.
r=SxxSyySxy=SD0(x)SD0(y)Cov0(x,y)
n=1이나 한 변수가 상수이면 상관은 정의하지 않습니다. 이때 “관계 없음이라 r=0”으로 채우면 분모 0과 실제 0상관을 혼동합니다. 매우 작은 제곱이 컴퓨터에서 0으로 저장되는 underflow도 수학적으로 정확한 상수와 다르므로 수치 상태를 따로 표시합니다.
상관은 가로·세로 역할을 바꿔도 같고, 양의 단위 배율·기준점 이동에 불변입니다. 음의 배율을 한쪽에만 적용하면 부호가 뒤집힙니다. 측정 원점에 민감한 원벡터 코사인과 구별합니다.
When both centered sums of squares are positive, define Pearson r by normalizing covariance. It is dimensionless and equals cosine between centered vectors.
r=SxxSyySxy=SD0(x)SD0(y)Cov0(x,y)
Singletons and constant variables have undefined correlation, not zero. Machine underflow of tiny squared values is also distinct from mathematical constancy and needs a numeric-status label.
Swapping variables, positive unit changes and shifts preserve r. One negative scale reverses its sign. Uncentered cosine has different shift behavior.
학부 연결 · 선택Undergraduate bridge · optional
24. 왜 상관은 −1과1 사이인가: Cauchy–Schwarz24. Cauchy–Schwarz bounds correlation between−1 and 1
중심화 벡터 u=x−x̄1, v=y−ȳ1에 Cauchy–Schwarz를 쓰면 |uᵀv|≤‖u‖‖v‖입니다. 두 노름이 양수일 때 나누면 |r|≤1입니다. 수리기초 13장의 내적 부등식을 실제 자료의 상관에 적용한 것입니다.
Sxy2≤SxxSyy,∣r∣≤1
등호는 두 비영 중심화 벡터가 서로 배수일 때입니다. 따라서 r=+1이면 y=a+bx의 양의 기울기, b>0, r=−1이면 b<0인 정확한 직선 위에 모든 점이 놓입니다. y가 상수인 b=0은 이 등호 사례가 아니라 상관 미정의입니다.
점이 두 개이고 두 좌표가 모두 다르면 언제나 |r|=1입니다. 이것만으로 큰 모집단의 완벽한 관계가 증명되지 않는 이유를 표본 크기와 함께 생각하세요. 계산값이 반올림으로 1처럼 보이는 경우도 정확한 등호와 구별합니다.
Apply Cauchy–Schwarz to the nonzero centered vectors and divide by their positive norms, as in Mathematical Foundations Chapter 13.
Sxy2≤SxxSyy,∣r∣≤1
Equality requires nonzero proportional centered vectors: an exact nonconstant affine line, with positive or negative slope. Constant responses remain undefined.
Two points with distinct coordinates always have|r|=1. This is not proof of a perfect population relationship, and rounded apparent equality is not exact equality.
기초Foundations
25. 상관 실습: 단위·부호·비선형·상수를 비교25. Correlation lab: compare scale, sign, nonlinearity and constants
실제 짝과 가정한 비선형·상수 자료를 선택합니다. x,y를 각각 배율과 이동으로 바꾸며 공분산·SD·상관이 어떻게 달라지는지 확인합니다. 양의 배율과 이동에서는 r가 같고, 한쪽 음의 배율에서는 부호가 바뀝니다.
배율 0을 넣으면 한 변수가 상수가 되어 r는 미정의입니다. 가정 비선형 자료에서는 아래 절의 제곱 관계가 확실해도 r=0일 수 있습니다. 원자료 관측과 선택한 수학적 반례를 같은 실측이라고 읽지 않습니다.
숫자 r와 산점도를 같이 보세요. 같은 r에도 곡선·극단값·집단 구성이 다를 수 있습니다. 표시 범위가 점을 잘라내지 않는지와 쌍이 원래 키를 유지하는지도 확인합니다.
Compare actual pairs with labeled hypothetical nonlinear and constant data. Apply affine transformations and inspect covariance, SD and r. Positive scales and shifts preserve r; one negative scale changes its sign.
A zero scale produces a constant and undefined r. The next nonlinear counterexample can have zero r despite a deterministic relationship.
Read the scatterplot together with the number, retaining all points and original pairings.
기초Foundations
26. 상관0은 관계 없음이나 독립의 증명이 아니다26. Zero correlation does not prove no relationship or independence
가정한 다섯 점 x=(−2,−1,0,1,2),y=x²=(4,1,0,1,4)를 보세요. x평균은0, y평균은2입니다. 중심화 교차곱은 (−4,1,0,−1,4)로 합0이므로 두 분산이 양수여도 r=0입니다.
y=x2,Sxy=0,r=0
그런데 x를 알면 y는 정확히 정해집니다. 이 다섯 점을 균등하게 고르는 확률에서도 두 변수는 독립이 아닙니다. 예를 들어 y=0인 것은 x=0인 것과 같아 사건 정보가 달라집니다. 상관은 중심화된 선형 함께 움직임을 요약합니다.
특정 결합 정규 모형처럼 추가 조건 아래 0상관과 독립을 연결하는 정리가 있지만 모든 데이터에 적용되지 않습니다. 독립·조건부 확률은 다음 두 장에서 자세히 다룹니다.
For hypothetical x=(−2,−1,0,1,2), y=x², the means are zero and two. The centered cross-products sum to zero while both variances are positive.
y=x2,Sxy=0,r=0
Yet x determines y. Under uniform selection of these points, the variables are not independent: the event y=0 identifies x=0. Correlation describes linear centered movement.
Special joint-normal results need additional assumptions. Zero correlation alone is not independence.
학부 연결 · 선택Undergraduate bridge · optional
27. 큰 상관도 원인·효과·기울기를 대신하지 않는다27. A large correlation does not identify causation or a slope
큰 양의 상관은 기록 안에서 함께 큰 값이 많다는 요약입니다. 공통 원인·선택·시간 추세·역방향 영향이 같은 모양을 만들 수 있습니다. “x를 개입해 바꾸면 y가 얼마나 변하는가”는 관찰 상관과 다른 질문입니다.
r는 무차원이라 y단위/x단위의 회귀 기울기와도 다릅니다. 절편이 있는 최소제곱에서 기울기=Sxy/Sxx=r·SDy/SDx라는 연결은 있지만, 기울기의 단위·모형·인과 의미를 따로 확인해야 합니다.
예측에 유용한 관계라도 다른 시점·대상에서 유지될지 평가해야 합니다. 결과 이름을 기술 상관, 예측 성능, 인과 효과로 나누고 각각 어떤 근거가 있는지 씁니다.
A large observed r does not isolate an intervention effect. Shared causes, selection, trends and reverse direction can produce associations.
Dimensionless r also differs from a unit-bearing regression slope. With an intercept, OLS connects them through the ratio of SDs, without making the slope causal.
Separate descriptive association, predictive evaluation and causal evidence, including transfer to new targets.
기초Foundations
28. 관측 범위·극단값·집계 수준이 상관을 바꿀 수 있다28. Range, extremes and aggregation can change observed correlation
특정 x범위만 남기거나 한 점을 추가·제거하면 평균·편차·r가 함께 바뀝니다. 좁은 범위에서 계산한 r와 전체 범위의 r는 같은 집합의 비교가 아닙니다. 제한하면 언제나 한 방향으로 변한다는 보편 규칙도 두지 않습니다.
국가 평균의 관계와 개인의 관계, 전체 펭귄과 종 안 관계를 구별합니다. 그룹 사이 평균 차이가 전체 공분산에 기여할 수 있습니다. 다음 절에서 전체를 집단 내부·집단 사이로 정확히 분해합니다.
관측 선택과 전처리를 결과 옆에 남기고, 가능하면 선택을 달리한 산점도·상관을 함께 검토합니다. 이런 민감도 분석은 새 모집단의 참관계를 발견했다는 인증이 아니라 계산이 어떤 포함 조건에 의존하는지 보여 주는 과정입니다.
Restricting x, adding or deleting points changes centers and r. The restricted set is a different target, and the direction of change is not universal.
Distinguish country aggregates from individuals and pooled species from within-species associations. Between-group mean differences can contribute to pooled covariance.
Report selection and preprocessing with sensitivity comparisons; they reveal dependence on inclusion rules rather than certifying a new population truth.
학부 연결 · 선택Undergraduate bridge · optional
29. 전체 공분산을 집단 내부와 집단 사이로 분해29. Decompose pooled covariance into within-group and between-group terms
같은 n쌍을 서로 겹치지 않는 집단 g로 나누고 w₍g₎=n₍g₎/n이라 합시다. 각 집단에서 x−전체평균=(x−집단평균)+(집단평균−전체평균)으로 나눕니다. y도 나누어 곱하고 더하면 집단 안 편차 합0 때문에 교차항이 사라집니다.
모든 c는 같은 n분모 방식의 기술 공분산입니다. 첫 항은 집단 내부 공분산의 크기 가중합, 둘째는 집단 평균의 공분산입니다. 분산에도 x=y를 넣은 같은 법칙이 성립합니다.
이것은 상관계수의 단순 평균 공식이 아닙니다. 상관의 분모 SD까지 집단별로 달라지기 때문입니다. 실제 종별 r들을 단순 평균해 전체 r로 부르지 않습니다. 집단 정의가 원래 측정·질문과 어떤 관련이 있는지도 밝힙니다.
Partition the same n pairs into disjoint groups with weights n_g/n. Split each deviation into a within-group deviation and a group-mean deviation. Cross terms vanish because within-group deviations sum to zero.
All covariances use descriptive denominators. The same decomposition gives total variance by setting y=x.
This is not a simple averaging formula for correlations, whose SD denominators differ by group.
기초Foundations
30. 집단 실습: 실제 종의 내부 기여와 평균 차이30. Grouping lab: separate within-species and between-species contributions
실제 342개 날개·몸무게 쌍을 종별 151 Adelie,68 Chinstrap,123 Gentoo로 나눕니다. 전체 평균선과 종별 평균, 종 안 공분산 기여, 종 평균 사이 기여를 구별해 보세요.
mm·g 기준 전체 공분산 약 9795.689699는 내부 기여 약 1779.761171과 사이 기여 약 8015.928528의 합입니다. 큰 종 사이 평균 차이가 전체의 함께 움직임에 많이 기여합니다. 실제 값을 유지한 정확한 분해이며 새 개체를 관측한 것이 아닙니다.
전체 r≈0.871202와 종별 r≈0.468202,0.641559,0.702667은 모두 양수입니다. 이 자료에서는 부호 반전이 일어나지 않았으므로 “Simpson 역전이 실제로 관측됐다”고 쓰지 않습니다. 집계와 조건부 요약이 다를 수 있다는 범위에서 설명합니다.
Split 342 actual pairs into 151 Adelie, 68 Chinstrap and 123 Gentoo records. Inspect pooled and subgroup means, within contributions and between-mean contributions.
Total covariance 9795.689699 mm·g equals within 1779.761171 plus between 8015.928528 approximately. This decomposes fixed observations.
Pooled r≈0.871202 and subgroup values≈0.468202,0.641559,0.702667 are all positive. This dataset does not exhibit a sign reversal; do not label it an observed Simpson reversal.
기초Foundations
31. 집계의 차이는 오류일 수도 질문의 차이일 수도 있다31. Aggregation differences can reflect different questions rather than arithmetic error
집단 구성비가 바뀌면 전체 평균·공분산·상관이 바뀔 수 있습니다. 어떤 자료에서는 각 집단의 관계와 전체 관계의 방향까지 바뀌는 Simpson 현상이 생기지만, 모든 집계 차이가 부호 반전은 아닙니다.
무조건 집단을 통제한 숫자만 옳다고 정하지 않습니다. 실제 질문이 전체 구성까지 포함한 기술인지, 같은 집단 안 비교인지, 인과 효과인지에 따라 필요한 요약과 가정이 다릅니다. 그룹 변수가 원인인지 결과인지·선택 조건인지도 인과 분석에서는 중요합니다.
이 장의 역할은 전체와 집단 안 수치를 나란히 보고 분모·무게·분해를 확인하는 것입니다. 모형에 무엇을 넣으면 인과 식별이 되는지는 이후 계량경제학에서 설계와 함께 다룹니다.
Changing group composition changes pooled summaries. In some data a Simpson reversal changes direction, but not every aggregation difference is a reversal.
A conditional result is not automatically the uniquely correct answer. The target may concern pooled composition, within-group comparison or causation, each requiring different assumptions.
Compare denominators, weights and decompositions before causal model selection, developed later in econometrics.
학부 심화 · 선택Advanced undergraduate · optional
32. 선택 심화: 완전자료 공분산 행렬은 준정부호32. Optional extension: a complete-data covariance matrix is positive semidefinite
같은 n≥1개 기록의 p변수를 열로 놓고 각 열 평균을 뺀 행렬 Xc를 만듭니다. 기술 공분산 행렬 Σ₀=XcᵀXc/n입니다. 대각선은 각 분산, 비대각선은 같은 기록에서 계산한 공분산입니다. 공통 완전 기록이 0개라면 이 행렬을 정의하지 않습니다.
Σ0=n1Xc⊤Xc,a⊤Σ0a=n1∥Xca∥2≥0
임의 계수 a로 만든 선형결합의 분산이 음수가 될 수 없다는 뜻입니다. Xc의 열이 종속하면 영고유값이 가능하므로 항상 양의 정부호라고 부르지는 않습니다. 수리기초 16장의 준정부호와 연결됩니다.
모든 계산이 같은 완전 기록과 같은 가중치에서 이루어졌다는 조건이 중요합니다. 다음 절에서는 쌍마다 다른 행을 고른 상관표가 이 구조를 잃을 수 있음을 반례로 확인합니다.
Center p columns on the same n≥1 complete records. The empirical covariance matrix is a Gram matrix. With zero common complete records, this matrix is undefined.
Σ0=n1Xc⊤Xc,a⊤Σ0a=n1∥Xca∥2≥0
Every linear-combination variance is nonnegative. Dependent centered columns can give zero eigenvalues, so positive definiteness is not guaranteed.
The common record set and weights matter; pairwise deletion can lose this structure.
각 쌍만 보면 rxy=1, rxz=1, ryz=−1입니다. 하지만 이 표는 하나의 공통 완전자료 상관 행렬일 수 없습니다. 음의 이차형식이 나와 준정부호 조건을 위반합니다. 완전사례는 이 가정 자료에서 0행입니다.
이는 쌍별 삭제가 언제나 틀렸다는 말이 아니라, 각 숫자의 사용 행이 다르고 행렬 해석에 주의가 필요하다는 뜻입니다. R 공식 cov·cor 문서도 pairwise.complete.obs 결과가 준정부호가 아닐 수 있음을 명시합니다.
Construct six hypothetical rows: two observed only on(x, y), equal-sign pairs; two only on(x, z), equal-sign pairs; two only on(y, z), opposite-sign pairs.
Each pair yields correlations 1,1,−1, but the combined matrix is not PSD and cannot be a single complete-data correlation matrix. There are zero complete rows.
Pairwise deletion uses different records for different entries; its matrix interpretation needs care, as official R documentation notes.
기초Foundations
34. 기업 사례: 중심화 상관과 원벡터 코사인은 다르다34. Company case: centered correlation differs from raw-vector cosine
실제 Apple FY2023·FY2024의 같은 5품목 매출을 x,y로 놓습니다. Pearson r≈0.997399876이고 원벡터 코사인은 약 0.998906239입니다. 둘 다 높은 숫자지만 같은 정의는 아닙니다.
Correlation compares centered category deviations; raw cosine compares origin-based vectors. A shared shift preserves r but generally changes raw cosine.
Five categories from one company over 53- and 52-week fiscal years do not establish equal category growth, a future firm-population law or causation.
기초Foundations
35. 실제 국가 사례: 단위가 다른 두 변수의 분산과 상관35. Actual countries: compare squared units with dimensionless correlation
2024년 선택한 16개국에서 x는 GDPpc,y는 출생 시 기대수명입니다. 기술 SD는 x 약23065.568431 불변2015USD/명, y 약5.114860년입니다. 공분산 약92549.661103은 두 단위를 곱한 값이고 r≈0.784471은 무차원입니다.
x의 평균 약31100.238572에 한 SD를 더하고 뺀 구간 안에 9개국이 들어갑니다.9/16=56.25%로 정규모형의68.27%와 다릅니다. 이 차이 자체가 계산 오류나 정규성 검정 결과는 아니며 실제 고정 자료의 비율입니다.
국가 선택은 세계 확률표본으로 제공된 것이 아닙니다. 국가 지표의 관련성을 개인 소득·개인 수명의 인과 관계로 옮기지 않습니다. 출처·지표 생성 방식·관측 단위를 유지합니다.
For sixteen selected 2024 countries, descriptive GDPpc SD is about 23065.568431 constant 2015 US dollars per person; life-expectancy SD is about 5.114860 years. Covariance 92549.661103 has product units; r≈0.784471 is dimensionless.
Nine countries fall within one GDPpc SD of the mean, or 56.25%, not the normal-model 68.27%. This is an observed proportion, not by itself a normality test.
The selected countries are not claimed to be a world probability sample or evidence of an individual-level causal income effect.
기초Foundations
36. 실제 펭귄 사례: 전체 r와 종별 r를 함께 읽기36. Actual penguins: read pooled and within-species correlations together
두 열 완전 342쌍에서 날개 평균 약200.915205mm,몸무게 평균 약4201.754386g입니다. n분모 SD는 각각 약14.041141mm,800.781229g이고 상관은 약0.871202입니다.
종 안 상관은 Adelie 약0.468202, Chinstrap 약0.641559, Gentoo 약0.702667입니다. 같은 자료의 종 사이 평균 차이와 내부 변동이 전체 수치에 함께 들어갑니다. 전체 상관이 크다고 각 종 안 관계가 같은 강도라고 볼 수 없습니다.
이 관계는 관측된 성체 기록의 기술 요약입니다. 원자료의 선택 설계가 별도로 확인되지 않은 상태에서 모든 개체에 같은 회귀·인과 효과를 보장하지 않습니다. sex가 없는 행을 불필요하게 지우지 않은342쌍이라는 분모도 남깁니다.
Across 342 complete pairs, means are about 200.915205 mm and 4201.754386 g. Descriptive SDs are 14.041141 mm and 800.781229 g, with r≈0.871202.
Within-species r values are about 0.468202,0.641559,0.702667. Between-species centers and within-species variation both shape the pooled result.
These describe recorded adults, not an established universal regression or causal effect. Retain the 342-pair denominator without unnecessary sex filtering.
기초Foundations
37. 실제 자료 실습: 분모와 중심화 관례를 바꾸며 검산37. Actual-data lab: audit divisors and centering conventions
국가·펭귄·기업의 실제 짝 자료에서 n,Sxx,Syy,Sxy와 기술·n−1 분모 결과를 비교합니다. 같은 쌍과 분모를 사용할 때 Pearson r가 같다는 것을 확인하고, 기업에서는 원코사인과 구별합니다.
가로·세로 단위와 분산·공분산의 곱단위를 표에 남깁니다. n−1 식의 숫자를 표시했다고 실제 자료가 iid라는 가정을 검증한 것은 아닙니다. 실제 기록·유도 계산·가정 시나리오의 구분을 유지합니다.
상수·한 쌍·빈 선택의 미정의 상태와, 계산 underflow·overflow 같은 산술 상태를 다른 설명으로 표시합니다. 수학적 0과 화면의0.000은 같은 증거가 아닙니다.
Compare n, Sxx, Syy, Sxy and n versus n−1 summaries on actual paired data. Correlation cancels a common divisor; company raw cosine remains a different statistic.
Keep variable, squared and product units visible. Displaying an n−1 formula does not verify iid sampling.
Distinguish mathematically undefined constant, singleton or empty cases from arithmetic underflow or overflow. A rounded 0.000 is not exact zero.
기초Foundations
38. 혼자 분석할 때 확인할 여덟 질문38. Eight checks for an independent analysis
①한 행은 무엇인가,②두 변수의 키가 맞는가,③어떤 결측 규칙으로 같은 쌍을 남겼는가,④n분모인가 n−1인가를 먼저 확인합니다. 다음으로 ⑤원단위·제곱단위·곱단위,⑥상수·영분모·산술 한계,⑦집단 구성·극단값·범위,⑧기술·예측·인과 주장의 근거를 검토합니다.
산점도와 편차 표를 함께 보며 수식의 각 항을 실제 기록에 연결합니다. 분산과 상관을 하나의 통계 소프트웨어 출력으로만 읽지 않으면, 모형을 바꾸거나 단위를 바꿔도 무엇을 유지해야 하는지 알 수 있습니다.
다음 장은 사건·조건부 확률입니다. 여기서 다룬 고정 자료의 같은 쪽 편차·비선형 반례를 확률 질문으로 다시 읽되, 표본의 기술량과 모집단 확률량을 구별하며 이어갑니다.
Check unit, pairing key, missing-pair rule and denominator; then physical/squared/product units, constant or numerical boundaries, groups/extremes/ranges, and the evidence for descriptive, predictive or causal claims.
Link each formula term to records in a scatterplot and deviation table rather than treating software output as an unexplained label.
The next chapter develops events and conditional probability, retaining the distinction between fixed-data summaries and population probability quantities.
기초Foundations
39. 국가·생물 관측·기업의 상세 케이스 스터디39. Detailed country, animal-measurement and company cases
국가 사례 · 흩어짐과 함께 움직임은 다른 질문이다
2024년 실제16개 국가의 GDP/명 x와 출생 시 기대수명 y를 같은 국가끼리 짝짓습니다. GDP/명은2015 USD/명, 기대수명은년 단위입니다. 먼저 각 변수의 평균에서 얼마나 벗어났는지 보고, 그다음 두 편차가 같은 방향으로 움직이는지를 봅니다. 이 자료는 국가 집계 지표이며 개인의 소득·수명을 직접 짝지은 자료가 아닙니다.
상관 r은 공분산을 두 표준편차로 나눠 무차원으로 만든 선형 관계 요약입니다. 산점도의 실제 점을 보면서 값의 방향과 특이한 위치도 함께 확인합니다. 숫자 하나가 그림 전체를 대신하지는 않습니다.
먼저 생각한 뒤 풀이 보기: GDP 단위를1000 USD/명으로 바꾸면 상관도1000배 바뀌나요?
GDP 편차와 표준편차는1/1000, GDP 분산은1/1,000,000, 공분산은1/1000이 됩니다. 상관의 분자·분모에서 같은 양의 배율이 상쇄되어 r은 같습니다. 단위가 다른 두 공분산의 숫자 크기를 곧바로 “관계가 더 강하다”로 비교하지 않습니다.
먼저 생각한 뒤 풀이 보기: 분모n−1은 언제 등장하나요?
sx2=n−1∑i(xi−x)2=n−1nVx
n−1로 나눈 표본분산도 별도 열에 제공합니다. 독립·동일분포이고 유한한 분산을 가진 표본 모형에서는 모분산의 불편추정 성질을 배울 수 있습니다. 이 파일에 “표본”이라는 이름을 붙였다고 그 가정이 자동으로 성립하지 않습니다. 같은 분모를 공분산과 두 분산에 일관되게 쓰면 r은 어느 쪽에서도 같습니다.
먼저 생각한 뒤 풀이 보기: 국가 상관이 양수이면 개인의 소득을 올려 수명을 늘리는 인과효과를 알 수 있나요?
이 계산만으로는 알 수 없습니다. 국가 수준의 연관을 개인 수준의 효과로 바꾸면 관측 단위가 달라집니다. 출생 시 기대수명은 해당 시점의 사망률 패턴을 유지한다는 조건의 집단 지표이며 개인의 미래 수명을 직접 예측한 값도 아닙니다. 관련 변수·선택 과정·시간과 제도를 더 검토해야 인과 질문으로 진행할 수 있습니다.
실제 펭귄의 날개 길이(mm)와 몸무게(g)를 같은 관측행에서 짝짓습니다. 두 변수가 함께 있는342개를 사용하며 빈 두 행은 CSV에 보존합니다. 성별은 이 계산에 필요하지 않으므로 추가로 완전사례를 요구하지 않습니다. 산점도는 관측 종과 원행 ID도 함께 보관합니다.
전체342개 실제 쌍의 기술적 요약 · 분모n
요약
날개 길이 x (mm)
몸무게 y (g)
평균
200.915205
4,201.754386
분산
197.153628 mm²
641,250.577101 g²
표준편차
14.041141 mm
800.781229 g
Cxy≈9795.689699mm⋅g,r≈0.871201767306
먼저 생각한 뒤 풀이 보기: 표준편차800.78 g를 분산800.78이라고 써도 되나요?
아닙니다. 몸무게의 기술적 분산은 약641,250.577101 g²이고 그 제곱근이 약800.781229 g입니다. 분모n−1을 쓰는 표본분산·표준편차는 또 조금 다르므로 파일의 ddof0과 ddof1 열을 구별합니다. 값뿐 아니라 단위와 분모를 같이 적습니다.
Apple의 다섯 품목 순매출을 FY2023 x, FY2024 y로 짝짓습니다. 한 기업의 품목5개이며 기업5개를 무작위 추출한 표본이 아닙니다. 단위는 양쪽 모두 백만 명목 USD이고 FY2023 53주/FY2024 52주 조건을 유지합니다. 선을 따라 시간 흐름으로 읽지 않고 같은 품목 두 값의 산점도로 봅니다.
Pearson 상관은 두 변수에서 각자의 평균을 뺀 뒤 방향을 비교합니다. 원벡터의 코사인은 평균을 빼지 않습니다. 같은 실제 값에 서로 다른 연산을 적용한 결과라 숫자가 달라도 오류가 아닙니다. 중심화한 벡터의 코사인이 Pearson r입니다.
먼저 생각한 뒤 풀이 보기: r이1에 가까우면 각 품목 매출이 두 해에 같았나요?
아닙니다. iPhone과 서비스 등은 증가했고 iPad·웨어러블 등은 감소했습니다. 실제 두 해 값의 차이 제곱합은131,716,926 (백만 USD)²로0이 아닙니다. 높은 상관은 큰 품목이 다음 해에도 상대적으로 큰 선형 패턴을 요약하며 y=x의 동일성을 뜻하지 않습니다.
먼저 생각한 뒤 풀이 보기: 품목5개로 아주 작은 p값을 계산하면 미래 실적을 보장할 수 있나요?
적절한 표집·관측 모형 없이 기계적으로 추론 검정을 붙이지 않습니다. 품목은 규모·구성·공시 체계를 공유하고, 임의 회사들의 독립 반복 표본이 아닙니다. 여기서 구한 것은 공시된5쌍의 기술적 상관입니다. 기업 가치·인과효과·미래 매출의 정확도를 인증한 값이 아닙니다.
먼저 생각한 뒤 풀이 보기: 보고서 한 문장으로 정리해 보세요.
“Apple의 FY2023·FY2024 공시5품목 순매출은 백만 명목 USD 기준 Pearson r≈0.9974의 선형 연관을 보였다. 이 값은53/52주 기간의 같은 품목 집계 비교이며, 매출 동일성이나 미래 실적의 확률 보장은 아니다.” 계산대상·기간·단위·범위를 함께 적으면 숫자의 뜻이 분명해집니다.
Country case · Spread and co-movement answer different questions
Pair actual 2024 GDP/person x and life expectancy at birth y for the same sixteen countries. Units are constant 2015 USD/person and years. First examine deviations within each variable, then ask whether paired deviations move together. National aggregates do not directly pair individual income with individual lifespan.
Positive and negative deviations cancel. Variance squares deviations before averaging, emphasizing larger distances. Standard deviation takes the square root and restores original units. We use n=16 to describe this observed country set itself.
Descriptive summaries of these countries · divisor n=16
Summary
GDP/person
Life expectancy at birth
Mean
31,100.238572 USD/person
78.381030 years
Variance
532,020,447.033472 (USD/person)²
26.161797 years²
Standard deviation
23,065.568431 USD/person
5.114860 years
Think first, then reveal: Must 68% lie within mean±one standard deviation?
No. Nine of these sixteen actual GDP/person values, or 56.25%, fall in that interval. Approximately 68% is a normal-model property, not a definition for every empirical distribution. A standard deviation is also not a standard error of the mean or a future prediction interval.
2. Read covariance signs from products of deviations
When both values are above their own means, or both below, their deviation product is positive. If only one is above, it is negative. Average these products for covariance. Check the first four actual countries in code order.
Subtract means, then multiply within the same country
Correlation divides covariance by both standard deviations, giving a dimensionless summary of linear association. Inspect actual scatter points as well as direction and unusual positions; one number does not replace the plot.
Think first, then reveal: Does measuring GDP in thousands of USD/person multiply correlation by 1000?
GDP deviations and standard deviation divide by 1000, its variance by one million, and covariance by 1000. The same positive scale cancels in correlation, leaving r unchanged. Numeric covariance magnitudes in different units cannot directly rank relationship strength.
Think first, then reveal: Where does the n−1 divisor enter?
sx2=n−1∑i(xi−x)2=n−1nVx
A separate column gives n−1 sample variance. Under an independent, identically distributed sampling model with finite variance, it has an unbiasedness property for population variance. Calling a file a sample does not establish these assumptions. Using one divisor consistently for covariance and both variances gives the same r.
Think first, then reveal: Does positive national correlation identify an individual income intervention’s effect on lifespan?
Not from this calculation. Moving from national association to individual effects changes the observation unit. Life expectancy at birth also summarizes a population under prevailing mortality patterns; it does not directly forecast an individual’s future lifespan. A causal question requires further information about variables, selection, time and institutions.
Individual-organism case · Pooled and within-species correlations differ
Pair actual flipper length (mm) with body mass (g) within the same penguin record. Use 342 complete pairs and retain both missing rows in the CSV. Sex is not needed for this calculation. The scatter plot preserves observed species and source row IDs.
Descriptive summaries of 342 actual pairs · divisor n
Summary
Flipper length x (mm)
Body mass y (g)
Mean
200.915205
4,201.754386
Variance
197.153628 mm²
641,250.577101 g²
Standard deviation
14.041141 mm
800.781229 g
Cxy≈9795.689699mm⋅g,r≈0.871201767306
Think first, then reveal: May a standard deviation of about 800.78 g be called variance 800.78?
No. Descriptive mass variance is approximately 641250.577101 g²; its square root is 800.781229 g. The n−1 sample-variance convention differs slightly again. Distinguish ddof 0 and ddof 1 columns, retaining units and divisors alongside values.
Think first, then reveal: Recalculate after converting the same 342 masses to kg.
Mass variance becomes approximately 0.641250577 kg² and covariance 9.795689699 mm·kg. Numeric moments change, but a common positive linear rescaling leaves correlation unchanged. This is a unit conversion, not new data or a stronger relationship.
1. Apply the same formulas within each observed species
Split the same actual records by species
Group
Valid paired n
Covariance (mm·g)
Correlation r
Pooled
342
9,795.689699
0.871201767
Adelie
151
1,394.732687
0.468201694
Chinstrap
68
1,732.677336
0.641559413
Gentoo
123
2,278.468504
0.702666524
Pooled correlation exceeds each within-species correlation. Across-species shifts in mean flipper length and mean mass add to the overall pattern. All correlations are positive here; this is group mixing, not a classic sign-reversal Simpson example.
Think first, then reveal: Is pooled correlation the average of three within-species correlations?
No. The displayed identity decomposes covariance. Correlation also uses pooled standard deviations. Neither an unweighted nor a sample-size-weighted average of group correlations generally equals pooled r. Reconstruct means, deviations and sums of squares.
Think first, then reveal: Does high r identify how much mass would increase if flippers were made longer?
That intervention was not tested. Observed association differs from a causal effect. Species, sex, time and observation conditions require further investigation. Comparing pooled and grouped results describes heterogeneous composition; it does not itself identify a cause.
2. Distinguish zero correlation from undefined correlation
Think first, then reveal: If one variable is constant, is r zero?
Its variance is zero, so Pearson’s denominator is zero and correlation is undefined. Do not replace “undefined” with a numeric claim of no association. Conversely, a defined zero correlation can coexist with a nonlinear relationship.
Think first, then reveal: Construct a nonlinear relationship with zero correlation.
In a separate illustrative mathematical example, x=(−1,0,1) and y=(1,0,1) satisfy y=x² exactly, but covariance and Pearson r are zero. These are not added penguin observations. Linear association, all possible relationships and independence are distinct concepts.
Company case · Does correlation 0.997 mean sales were equal?
Pair Apple’s five disclosed category totals: FY 2023 x and FY 2024 y. These are categories of one company, not five randomly sampled firms. Both axes use million nominal USD; retain 53-week FY 2023 and 52-week FY 2024 periods. Read a category-pair scatter plot, not a connected time path.
Actual filing deviations and products · means 76657 and 78207
Think first, then reveal: Why does Pearson correlation differ from the sales vectors’ cosine?
Pearson correlation subtracts each variable’s own mean before comparing directions; the original-vector cosine does not. Different operations on the same actual values need not produce the same number. The cosine of the centered vectors equals Pearson r.
Think first, then reveal: Does r near one mean every category’s sales were unchanged?
No. Some categories increased and others declined. Actual squared differences sum to 131,716,926 (million USD)², not zero. High correlation summarizes a pattern in which larger categories remain relatively large; it does not establish the identity y=x.
Think first, then reveal: Would a mechanically computed small p-value guarantee future performance?
Do not attach inferential tests without a suitable observation and sampling model. Categories share scale, composition and disclosure structure; they are not independent repetitions of randomly selected firms. This is descriptive correlation for five disclosed pairs, not certification of valuation, causality or future sales accuracy.
Think first, then reveal: Write a report sentence with the needed scope.
“Apple’s five FY 2023/FY 2024 disclosed category net-sales pairs showed Pearson linear association r≈0.9974 in million nominal USD. This compares matched aggregates across 53/52-week periods; it establishes neither equal sales nor a probabilistic guarantee of future performance.” Include target, period, units and scope.
Use the NIST Pearson formula to check centered sums. Test calculations on that page require additional sampling assumptions beyond descriptive arithmetic.
The unbiasedness proof in Stanford CS109 sampling notes explicitly assumes iid data. After the embedded videos and cases, reproduce gram-to-kilogram covariance, SD and correlation changes on actual pairs.
자료 묶음을 풀고 코드와 실제데이터 폴더를 함께 두세요. 터미널에서 코드 파일이 있는 폴더로 이동해 아래 명령을 실행합니다. 코딩이 처음이라면 손계산과 웹 실습을 먼저 하고, 데이터 사이언스 입문에서 코드를 배운 뒤 돌아와도 됩니다.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.
결과 파일은 각 코드에 지정된 결과 폴더에 저장됩니다. 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.
상관은 인과와 어떻게 다른가?Correlation Doesn’t Equal Causation
CrashCourse · Statistics 8
본문에서 공식 영상을 보고 산점도·선형 연관·인과의 차이를 살펴봅니다. 국가와 펭귄 사례에서 관측 단위가 무엇인지 먼저 말해 보세요.Watch the official video in this chapter and distinguish scatter plots, linear association and causation. Identify the observation unit in the country and penguin cases first.
교재 안의 YouTube 플레이어에서 재생합니다. 원영상에서 제공하는 자막은 플레이어의 CC·설정에서 선택할 수 있습니다.Playback stays in this chapter’s YouTube player. Available captions can be selected through CC/settings.
보고 읽은 뒤 답하기Respond after watching/reading상관이0이면 아무 관계도 없나요?Does zero correlation mean no possible relationship?
생각을 점검하는 해설Check your reasoning
Pearson r은 선형 연관의 요약입니다. 가정한 y=x² 반례처럼 비선형 관계는 남을 수 있고, 상수 변수에서는 상관 자체가 정의되지 않습니다.Pearson r summarizes linear association. A nonlinear relationship can remain, as in the illustrative y=x² example; a constant variable instead gives undefined correlation.
윌리엄 고셋 · 실무 문제에서 표본 변동을 묻기William Sealy Gosset: sampling variability in practice
University of St Andrews · MacTutor
대학 소개에서 고셋(1876–1937)의 양조 실무와 평균·표준편차·상관의 표집 연구를 읽습니다. 기술통계와 추론을 위한 표본 모형을 구별해 보세요.Read the university account of Gosset (1876–1937), brewing and work on sampling behavior of means, standard deviations and correlation. Distinguish descriptive moments from a sampling model for inference.
보고 읽은 뒤 답하기Respond after watching/reading다섯 품목을 계산했다고 독립 기업5개를 표집한 것인가요?Does calculating five categories mean five independent companies were sampled?
생각을 점검하는 해설Check your reasoning
아닙니다. 한 기업의 공시 품목5개입니다. 추론의 불확실성을 계산하려면 독립성·표집 단위·분포 가정을 따로 명시해야 합니다.No. They are five disclosed categories of one company. Inference needs separately stated observation units, independence and distribution assumptions.
분산의 제곱 단위와 표준편차의 원래 단위Squared variance units and original standard-deviation units
NIST/SEMATECH · Measures of Scale
Definitions of Variability의 분산·표준편차 정의를 읽습니다. 원문은n−1 표본분산이므로 본문n 분모의 기술적 분산과 대응시켜 비교합니다.Read variance and standard deviation under “Definitions of Variability.” The source uses n−1 sample variance; compare it with our n-divisor descriptive convention.
보고 읽은 뒤 답하기Respond after watching/readingg를 kg로 바꾸면 분산은1000으로 나누나요?Does converting g to kg divide variance by 1000?
생각을 점검하는 해설Check your reasoning
표준편차는1000, 분산은1,000,000으로 나눕니다. 공분산은 변환한 좌표의 배율만큼 바뀌며 상관에서는 양의 배율이 상쇄됩니다.Standard deviation divides by 1000 and variance by one million. Covariance follows coordinate scales; positive factors cancel in correlation.
중심화 제곱합으로 Pearson 상관 재현하기Reproduce Pearson correlation from centered sums
NIST Dataplot · CORRELATION definition
Description의 Sxx·Syy·Sxy와r 공식을 읽고 실제 CSV에서 재현합니다. 검정의 p값 부분은 표집·분포 가정을 배우는 뒤 장에서 따로 읽습니다.Read Sxx, Syy, Sxy and r in the Description and reproduce them from actual CSVs. Defer p-value procedures until sampling and distribution assumptions are studied.
보고 읽은 뒤 답하기Respond after watching/reading공분산은n, 두 분산은n−1로 섞어도 같은r인가요?May covariance use n while both variances use n−1 and still give the same r?
생각을 점검하는 해설Check your reasoning
분모를 섞으면 배율이 맞지 않습니다. 모두n 또는 모두n−1로 일관되게 계산하면 같은r이며, 중심화 제곱합 공식에서는 공통 배율이 바로 상쇄됩니다.Mixed divisors introduce a scale mismatch. Consistent n or consistent n−1 gives the same r; the centered-sum formula cancels common factors directly.
연습문제 · 계산에서 설명과 증명까지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 variance
가정 자료 (4,4,4,4)와 (1,2,3,10)의 평균·n분모 분산을 비교하세요.
Compare means and descriptive variances of (4,4,4,4) and(1,2,3,10).
풀이와 확인할 이유Solution and explanation
평균은 둘 다4입니다. 첫 분산은0, 둘째는(9+4+1+36)/4=12.5입니다. 같은 중심이 같은 흩어짐을 뜻하지 않습니다. 그림과 다른 척도를 함께 봅니다.
Both means are 4. Variances are 0 and 12.5. Equal centers do not determine spread.
2. 임의 중심의 편차 합Deviation sums at different centers
(1,2,3,10)에서 c=3과 c=4의 편차 합을 구하고 n(평균−c)로 검산하세요.
For(1,2,3,10), compute deviation sums at c=3,4 and check n(mean−c).
풀이와 확인할 이유Solution and explanation
평균4, n=4입니다. c=3의 합은4, c=4의 합은0입니다. 각각4(4−3),4(4−4)와 같습니다. 평균 이외 중심에서0합을 기대하면 안 됩니다.
The sums are 4 and 0, matching 4(4−3) and 4(4−4). Zero-sum deviations require the mean center.
3. 중심 이동의 제곱합Squared totals after a shift
자료 (1,2,3,10)에서 SSE(4)=50입니다. c=0의 SSE를 직접 계산하고 항등식으로 검산하세요.
For(1,2,3,10), SSE(4)=50. Find SSE(0) directly and by the center-shift identity.
풀이와 확인할 이유Solution and explanation
직접 합은1+4+9+100=114입니다. 항등식은50+4(0−4)²=114입니다. 제곱합 최소가 평균에 있다는 사실과 이동 비용을 동시에 확인합니다.
The direct total 114 equals 50+4·16. The identity locates the mean minimum and quantifies the added squared distance.
4. 범위만 같을 때Equal ranges
(0,0,0,10)과 (0,5,5,10)의 범위와 평균을 구하고 범위가 놓치는 정보를 설명하세요.
Compare ranges and means of (0,0,0,10) and(0,5,5,10). What does range omit?
풀이와 확인할 이유Solution and explanation
범위는 둘 다10입니다. 평균은2.5와5로 다르고 중간 배치도 다릅니다. 범위는 양끝 두 값만 쓰므로 내부의 집중·중심을 복원하지 못합니다.
Both ranges are 10, while means are 2.5 and 5. Range ignores the interior arrangement and cannot recover the center.
5. AAD와 원 MADAAD and raw MAD
(1,2,3,10)의 평균절대편차와 보정하지 않은 MAD를 구하세요.
Compute average absolute deviation and unscaled MAD for(1,2,3,10).
풀이와 확인할 이유Solution and explanation
평균4에서 거리(3,2,1,6)의 평균은3입니다. 중앙값2.5에서 거리(1.5,0.5,0.5,7.5)의 중앙값은1입니다. 중심과 마지막 연산이 달라 서로 다른 척도입니다. 보정계수는 곱하지 않습니다.
Distances from mean 4 average to 3. Distances from median 2.5 have median 1. The two definitions use different centers and aggregation operations.
6. MAD0과 상수의 차이Zero MAD need not mean constant
(0,0,0,10)의 원 MAD와 기술 분산을 구하세요. MAD가0이면 모두 같은 값인가요?
Find raw MAD and descriptive variance of (0,0,0,10). Does zero MAD imply all values are equal?
풀이와 확인할 이유Solution and explanation
중앙값0이고 거리도(0,0,0,10)이라 MAD=0입니다. 평균2.5에서 제곱합75이므로 분산18.75입니다. 많은 동률이 MAD0을 만들지만 모든 값이 같지는 않습니다.
MAD is 0, while mean 2.5 gives centered squared total 75 and variance 18.75. Central ties can make MAD zero despite an extreme value.
7. 역CDF IQR와 울타리Inverse-CDF IQR and fences
자료 (1,2,3,10)의 type1 사분위값·IQR·1.5IQR 울타리를 구하고10의 표시 의미를 설명하세요.
For(1,2,3,10), find type 1 quartiles, IQR and 1.5-IQR fences. What does flagging 10 mean?
풀이와 확인할 이유Solution and explanation
Q1=1, Q3=3, IQR=2입니다. 울타리는−2와6이라10이 밖입니다. 이는 선택한 탐색 규칙의 표시이고 측정 오류·삭제 필요의 증명은 아닙니다. 다른 분위수 관례도 명시해야 합니다.
Q1=1, Q3=3, IQR=2, fences−2 and 6. Ten is flagged by this exploratory rule, not proved erroneous. Other quartile conventions must be labeled.
8. 두 분모의 분산Two variance divisors
제곱합50, n=4에서 ddof0·ddof1 분산과 비율을 구하세요.
With centered total 50, n=4, compute ddof 0 and ddof 1 variances and their ratio.
풀이와 확인할 이유Solution and explanation
값은50/4=12.5와50/3입니다. 비율은4/3으로 n/(n−1)입니다. 같은 제곱합의 다른 정의이며 추론 가정 없이 어느 하나를 무조건 오산이라 부르지 않습니다.
They are 12.5 and 50/3, with ratio 4/3. These are different divisor conventions, not contradictory arithmetic.
9. 빈 자료·한 값·상수Empty, singleton, constant
빈 자료,{7},(7,7,7)의 기술 분산·n−1 분산·상관 상태를 구별하세요.
Compare descriptive variance, n−1 variance and correlation status for empty data,{7},(7,7,7).
풀이와 확인할 이유Solution and explanation
빈 자료는 평균·분산·상관이 미정의입니다. 한 값의 기술 분산0, n−1 분산 미정의이며 상관도 미정의입니다. 세 상수값은 두 분산0이지만 어느 쌍과도 분모0 상관은 미정의입니다.
Empty data are undefined. Singleton descriptive variance is 0 but n−1 variance is undefined. Constant data of length 3 have both variances 0; correlation involving a constant remains undefined.
10. 분산 단위 변환Variance-unit conversion
몸무게 기술 분산641250.577101g²,SD800.781229g를 kg단위로 변환하세요.
Convert variance 641250.577101 g² and SD 800.781229 g to kilogram units.
풀이와 확인할 이유Solution and explanation
분산은10⁶으로 나누어 약0.641250577101kg²입니다. SD는1000으로 나누어 약0.800781229kg입니다. 제곱량과 원단위량의 배율을 구별합니다.
Variance becomes 0.641250577101 kg² and SD 0.800781229 kg. The squared quantity scales by 10⁻⁶, not 10⁻³.
n≥2이고 분산σ²>0인 Z를 n번 그대로 복제한 Xᵢ=Z에서 s²와 iid 증명 실패 지점을 쓰세요.
For n≥2, if every Xᵢ duplicates one random Z with variance σ²> 0, find s² and the failed iid proof step.
풀이와 확인할 이유Solution and explanation
표본 안 모든 값이 같아 s²=0입니다. 각 Xᵢ의 주변분산은σ²여도 독립이 아니어서 Var(X̄)=σ²/n이 성립하지 않습니다. 같은 관측을 복사해도 독립 정보가 늘지 않는다는 반례입니다.
Within-sample s² is always 0. Independence fails, and Var(X̄)=σ² rather thanσ²/n. Copying records does not create independent information.
14. 선택 심화: SD 불편성은 별도Optional: SD need not be unbiased
두 iid Bernoulli(1/2)값에서 s²가0 또는1/2임을 이용해 E[s]와 모집단SD1/2를 비교하세요.
For two iid Bernoulli(1/2) values, s² is 0 or 1/2. Compare E[s] with population SD 1/2.
풀이와 확인할 이유Solution and explanation
두 값이 다를 확률1/2에서 s=1/√2, 같을 때0입니다. E[s]=1/(2√2)≈0.353553로0.5와 다릅니다. E[s²]=0.25는 맞지만 제곱근을 취한 추정량의 불편성까지 따라오지 않습니다.
Different values occur with probability½ and give s=1/√2. Thus E[s]=1/(2√2)≈0.353553, not 0.5. Unbiased variance does not imply unbiased SD.
15. SD와 평균SESD versus mean SE
iid 모형에서 원값SD10, n=25일 때 평균SE와 원값SD를 구별하세요.
Under iid sampling with value SD 10, n=25, find mean SE and distinguish raw SD.
풀이와 확인할 이유Solution and explanation
평균SE는10/√25=2입니다. 원값의SD는 여전히10입니다. 표본 크기가 평균의 변동을 줄여도 개별값의 흩어짐을 같은 방식으로 줄이지 않습니다. 의존 자료에는 이 식을 자동 적용하지 않습니다.
Mean SE is 2 while value SD remains 10. The formula requires the sampling model and does not automatically apply to dependent records.
16. 경험 ChebyshevEmpirical Chebyshev
양의 기술 분산을 가진 자료에서2SD 이상 떨어진 값의 최대 비율과 엄격히2SD 안의 최소 비율을 구하세요.
For positive descriptive variance, bound the share at least 2 SD from the mean and the share strictly inside.
풀이와 확인할 이유Solution and explanation
제곱합 상계로 바깥 비율은1/2²=1/4 이하입니다. 따라서 엄격한 안쪽 비율은3/4 이상입니다. 실제 비율이 항상75%라는 뜻이 아니며 v₀=0인 경우는 따로 다룹니다.
The outer share is at most¼, so the strict inner share is at least¾. This is a bound, not an exact 75%rule; zero variance is handled separately.
17. 실제1SD 비율Actual one-SD share
16개국 중 평균±기술SD 안에9개가 있으면 비율과 정규68.27%규칙과의 관계를 쓰세요.
Nine of 16 countries fall within mean±descriptive SD. Find the share and compare with 68.27%.
풀이와 확인할 이유Solution and explanation
9/16=56.25%입니다. 정규 모형 비율과 다르지만 SD 정의에 위배되지 않습니다. 이 수 하나만으로 정규성 검정까지 수행한 것은 아닙니다.
The observed share is 56.25%. The normal-model percentage is not a universal SD identity, and this comparison alone is not a formal normality test.
18. 이동과 부호 변환Shift and sign transformation
y=−2x+100이면 기술 분산·SD는 각각 어떤 배율로 바뀌나요?
For y=−2 x+100, how do descriptive variance and SD change?
풀이와 확인할 이유Solution and explanation
중심을 빼면 y편차=−2x편차입니다. 분산은4배, SD는2배이며100의 이동은 영향을 주지 않습니다. 부호가 음수라도 분산은 음수가 되지 않습니다.
Centered deviations scale by−2, so variance scales by 4 and SD by 2. The shift has no effect and variance cannot become negative.
19. z점수의 분모A z-score divisor
자료(−1,1)의 n분모 SD와 z점수를 구하고 n−1 SD를 쓰면 경험분산이 어떻게 되는지 쓰세요.
For(−1,1), find descriptive SD and z-scores, then the descriptive variance if n−1 SD is used.
풀이와 확인할 이유Solution and explanation
평균0, 기술 분산1, SD1이라 z=(−1,1)입니다. n−1 SD는√2라 변환값은±1/√2입니다. 이들의 n분모 분산은1/2이고 n−1 분산은1입니다. 표준화 관례를 밝혀야 합니다.
Descriptive SD is 1, giving z=±1. Using sample SD√2 gives z=±1/√2, whose descriptive variance is½ while n−1 variance is 1.
20. 대수식과 상쇄오차Cancellation in a shortcut
가정 입력(10¹⁶,10¹⁶+2,10¹⁶+4)의 정확한 분산을 구하고 shortcut이0을 낼 수 있는 이유를 설명하세요.
Find exact variance of (10¹⁶,10¹⁶+2,10¹⁶+4) and explain why a shortcut can return 0.
풀이와 확인할 이유Solution and explanation
정확한 평균은10¹⁶+2이고 편차−2,0,2의 제곱합8을3으로 나눠8/3입니다. 평균제곱 차 방식은 약10³² 크기의 가까운 두 수를 빼 작은 차이를 잃을 수 있습니다. 기계0과 수학적 상수 분산0을 구별합니다.
Centered deviations−2,0,2 give variance 8/3. Subtracting two nearby numbers around 10³² can lose that small difference. A machine zero is not proof of mathematical constancy.
21. 따로 정렬한 쌍의 오류Sorting columns separately
x=(1,2,3),y=(3,1,2)의 원상관과 두 열을 따로 정렬한 뒤 상관을 비교하세요.
Compare correlation for x=(1,2,3), y=(3,1,2) with correlation after sorting columns independently.
풀이와 확인할 이유Solution and explanation
두 평균2, 각Sxx=Syy=2이고 원Sxy=−1이라 r=−1/2입니다. 따로 정렬하면 같은 벡터(1,2,3)끼리 짝지어 r=1이 됩니다. 원관계가 바뀌었으므로 자료를 정리한 것이라 부를 수 없습니다.
Original centered totals are 2,2,−1, giving r=−½. Independent sorting creates identical ordered vectors and r=1. It fabricates new pairings rather than merely cleaning data.
22. 직접 공분산 계산Compute covariance directly
x=(1,2,3),y=(2,4,6)의 평균·Sxy·n분모 공분산·r를 구하세요.
For x=(1,2,3), y=(2,4,6), find means, Sxy, descriptive covariance and r.
Covariance is−Var 0(x) and r=−1 because centered deviations are negatives. Constant x would instead make correlation undefined.
24. 실제 공분산 단위Actual covariance units
실제 날개·몸무게 공분산9795.689699mm·g를 mm·kg와 cm·kg로 바꾸세요.
Convert 9795.689699 mm·g into mm·kg and cm·kg.
풀이와 확인할 이유Solution and explanation
몸무게를 나누면9.795689699mm·kg입니다. 날개를cm로 바꾸면0.9795689699cm·kg입니다. 같은 관측의 배율 변환이고 상관은 두 양의 단위 변환에서 유지됩니다.
The results are 9.795689699 mm·kg and 0.9795689699 cm·kg. Positive unit conversions preserve correlation while changing covariance units and magnitude.
25. 공분산 0과 상관 미정의Zero covariance, undefined correlation
x=(1,2,3),y=(7,7,7)에서 Sxy·공분산·r를 구별하세요.
For x=(1,2,3), y=(7,7,7), distinguish Sxy, covariance and r.
풀이와 확인할 이유Solution and explanation
y의 모든 중심화 편차가 0이라 Sxy와 공분산은 0입니다. 그러나 Syy=0으로 상관 분모가 0이라 r는 미정의입니다. 이를 상관 0으로 표시하면 비선형 0상관 반례와 다른 상태를 혼동합니다.
Sxy and covariance are 0 because all centered y values vanish. But Syy=0 makes r undefined, not zero correlation.
26. 합의 분산과 공분산Variance of a sum
비상수 x에 y=x 또는 y=−x를 두고 Var₀(x+y)를 공분산 항등식으로 구하세요.
For nonconstant x and y=x or y=−x, compute Var 0(x+y) using the covariance identity.
풀이와 확인할 이유Solution and explanation
y=x이면 두 분산과 두 배 공분산을 합해 4Var₀(x)입니다. y=−x이면 공분산이 −Var₀(x)라 합이 0입니다. 분산을 단순히 더하려면 공분산 0 같은 추가 조건이 필요합니다.
The results are 4 Var 0(x) and zero respectively. The covariance term prevents simply adding variances without a zero-covariance condition.
For the same nonconstant pairs, show that covariance Sxy/d and variances Sxx/d, Syy/d give the same r for every d> 0.
풀이와 확인할 이유Solution and explanation
비율은 (Sxy/d)/[√(Sxx/d)√(Syy/d)]입니다. 분모의 1/d와 분자의 1/d가 소거되어 Sxy/√(SxxSyy)입니다. 같은 쌍·같은 d라는 조건을 바꾸면 이 검산이 적용되지 않습니다.
The two square-root factors contribute 1/d, cancelling the numerator divisor. The argument requires the same paired records and common positive divisor.
28. 상관 범위의 증명Prove the correlation bound
비영 중심화 벡터 u,v에서 Cauchy–Schwarz로 |r|≤1을 증명하고 등호 조건을 쓰세요.
Use Cauchy–Schwarz for nonzero centered vectors u, v to prove |r|≤1 and state equality conditions.
풀이와 확인할 이유Solution and explanation
|uᵀv|≤‖u‖‖v‖를 양의 노름 곱으로 나누면 됩니다. 등호는 두 비영 벡터가 배수일 때입니다. 원자료에서는 모든 점이 비영 기울기의 한 직선에 놓이며, 상수 변수는 분모 0이라 제외합니다.
Divide |uᵀv|≤‖u‖‖v‖ by the positive norm product. Equality requires proportional nonzero vectors, corresponding to a nonconstant affine line. Constants are undefined cases.
29. 두 점의 완벽한 상관Perfect correlation with two points
두 점 (1,5),(3,9)의 r를 구하고 모집단의 완벽한 선형 관계를 증명하는지 설명하세요.
Find r for (1,5),(3,9) and interpret whether this proves a perfect population law.
풀이와 확인할 이유Solution and explanation
각 중심화 벡터는 (−1,1),(−2,2)라 r=1입니다. 두 점은 비상수라 언제나 어떤 직선을 정확히 정할 수 있습니다. 표본 두 점의 항등 성질이 더 큰 모집단의 오차 없는 관계를 보장하지 않습니다.
The centered vectors are (−1,1),(−2,2), giving r=1. Two distinct-coordinate points always lie on a line; that does not prove a perfect population relationship.
30. 상관의 부호와 단위Correlation sign and scale
u=−2x+7, v=3y−10에서 기존 r≠0이면 새 상관과 공분산 배율을 쓰세요.
For u=−2 x+7, v=3 y−10, find the covariance multiplier and transformed nonzero r.
풀이와 확인할 이유Solution and explanation
공분산 배율은 (−2)·3=−6입니다. 각 SD 배율은 2와 3이라 상관 크기는 같고 부호만 바뀌어 −r입니다. 기준점 이동은 두 중심화 결과에서 사라집니다.
Covariance scales by −6, while SDs scale by 2 and 3. Correlation becomes −r. Additive shifts disappear after centering.
For hypothetical x=(−2,−1,0,1,2), y=x², find means, Sxy, descriptive variances and r.
풀이와 확인할 이유Solution and explanation
평균은 0과 2입니다. 교차곱 합은 0, Sxx=10, Syy=14라 분산은 2와 14/5입니다. 두 분산이 양수이므로 r=0입니다. 그래도 y가 x의 제곱으로 정확히 정해지는 관계가 있습니다.
Means are 0 and 2; Sxy=0, Sxx=10, Syy=14. Variances are 2 and 14/5, so r=0 despite the exact quadratic relationship.
32. 독립이 아님을 사건으로Show dependence with events
x=(−2,−1,0,1,2),y=x²의 다섯 짝을 균등하게 고를 때 A={x=0},B={y=0}의 확률로 독립이 아님을 검산하세요.
Select the five pairs x=(−2,−1,0,1,2), y=x² uniformly. Use A={x=0}, B={y=0} to check independence.
풀이와 확인할 이유Solution and explanation
두 사건은 같은 한 점을 가리켜 P(A)=P(B)=1/5, P(A∩B)=1/5입니다. 곱 P(A)P(B)=1/25와 다릅니다. 상관 0이어도 사건 정보가 독립일 필요가 없음을 보입니다. 독립의 정식 조건은 다음 장으로 연결합니다.
Both events identify the same point. Their probabilities are 1/5 each and joint probability 1/5, not 1/25. Zero correlation does not imply event independence.
Given penguin covariance≈9795.689699 mm·g and flipper variance≈197.153628 mm², find the intercept-OLS slope units and approximate value.
풀이와 확인할 이유Solution and explanation
비율은 약 49.685566 g/mm입니다. kg/mm로는 약 0.049685566입니다. r≈0.871202와 다른 수량이고, 날개 1mm 개입의 인과 효과가 아니라 선택한 기술 회귀의 기울기입니다. 정밀 계산은 원값 제곱합을 사용합니다.
It is about 49.685566 g/mm, or 0.049685566 kg/mm. This differs from dimensionless r and is a descriptive fitted slope, not an identified intervention effect.
34. 큰 r의 인과 주장A causal claim from a large r
국가 GDPpc·기대수명 r≈0.784471을 GDP를 특정 금액 늘리면 수명이 그만큼 늘어난다는 효과로 읽어도 될까요?
Does country GDPpc–life-expectancy r≈0.784471 identify an effect of increasing GDP by a specified amount?
풀이와 확인할 이유Solution and explanation
아닙니다. r는 단위가 없고 관찰된 국가 관계를 요약합니다. 공통 요인·선택·집계 수준과 인과 설계가 따로 필요합니다. 상관, 기울기, 개입 효과를 구별해야 합니다.
No. The dimensionless summary does not identify a unit-bearing intervention effect. Selection, shared factors and aggregation require a separate causal design.
35. SD와 예측 오차SD versus prediction guarantees
몸무게 SD≈800.781229g라는 사실만으로 모든 새 펭귄 예측 오차가 그 이하라고 보장되나요?
Does mass SD≈800.781229 g guarantee every new penguin prediction error is smaller?
풀이와 확인할 이유Solution and explanation
아닙니다. SD는 정해진 관측 분포의 흩어짐입니다. 새 대상의 분포·예측 모형·예측구간을 별도로 정의해야 합니다. SD가 오차의 최대값이나 개별 예측 보장으로 바뀌지는 않습니다.
No. SD describes a specified distribution, not maximum prediction error. New-target assumptions, a prediction model and interval construction are separate.
36. 실제 공분산 분해Actual covariance decomposition
실제 총공분산9795.689699, 내부1779.761171, 사이8015.928528의 합과 의미를 설명하세요. 단위는 mm·g입니다.
Interpret total covariance 9795.689699 as within 1779.761171 plus between 8015.928528 mm·g.
풀이와 확인할 이유Solution and explanation
두 기여를 더하면 반올림 수준에서 총량과 같습니다. 내부는 종 안 공분산의 n가중합, 사이는 종별 평균 편차 곱의 가중합입니다. 상관계수를 더한 공식이 아니고, 고정 342쌍의 기술 분해입니다.
The contributions sum to the rounded total. They are weighted within-species covariances and covariance of species means, not a sum of correlation coefficients.
37. 상관 평균의 실패Averaging correlations fails
전체 r≈0.871202와 종별 r≈0.468202,0.641559,0.702667에서 전체가 종별 단순평균인지 검산하세요.
Check whether pooled r≈0.871202 equals the simple average of species values≈0.468202,0.641559,0.702667.
풀이와 확인할 이유Solution and explanation
단순평균은 약 0.604143으로 전체와 다릅니다. 공분산의 내부·사이 항뿐 아니라 각 분산의 분해도 전체 r에 들어갑니다. 같은 가중평균 공식을 상관에 복사할 수 없습니다.
The average is about 0.604143, not the pooled value. Pooled r depends on total covariance and variances, including between-group contributions.
38. 실제 부호 반전 여부Was a reversal observed?
전체와 세 종의 r가 모두 양수입니다. 이를 실제 Simpson 부호 반전이라고 부르면 맞나요?
All pooled and species correlations are positive. Is this an observed Simpson sign reversal?
풀이와 확인할 이유Solution and explanation
아닙니다. 강도 차이는 있지만 부호가 반대인 것은 아닙니다. 이 자료는 집계와 종 안 요약이 다름을 보여 줍니다. 가능한 일반 현상과 실제 자료에서 확인된 현상을 구별합니다.
No. Their strengths differ without a sign reversal. Distinguish a possible general phenomenon from what the actual data exhibit.
39. 공분산 행렬의 준정부호PSD covariance matrix
n≥1의 공통 중심화 행렬 Xc에서 aᵀ(XcᵀXc/n)a≥0을 보이고 항상 양의 정부호인지 답하세요.
For n≥1 common centered data Xc, prove aᵀ(XcᵀXc/n) a≥0. Must it be positive definite?
풀이와 확인할 이유Solution and explanation
값은 ‖Xc a‖²/n이라 비음수입니다. 비영 a라도 Xc a=0인 종속 방향이 있으면 0일 수 있어 준정부호입니다. 양의 정부호에는 중심화 열의 독립성 같은 추가 조건이 필요합니다.
The expression is ‖Xc a‖²/n. Dependent columns can give zero for nonzero a, so PSD does not automatically imply positive definite.
40. 쌍별 행렬의 모순An inconsistent pairwise matrix
R=[[1,1,1],[1,1,−1],[1,−1,1]],a=(−1,1,1)에서 aᵀRa를 계산하고 공통 완전자료 상관 행렬인지 판단하세요.
For R=[[1,1,1],[1,1,−1],[1,−1,1]], a=(−1,1,1), compute aᵀRa and assess common complete-data interpretation.
풀이와 확인할 이유Solution and explanation
Ra=(1,−1,−1)이고 내적은 −3입니다. 공통 완전자료의 Gram 구조는 모든 이차형식이 비음수여야 하므로 해당 행렬일 수 없습니다. 쌍마다 다른 결측 삭제가 만드는 비일관성의 반례입니다.
Ra=(1,−1,−1), giving −3. A common complete-data correlation matrix is PSD, so this matrix cannot have that interpretation. Different pairwise deletion sets can cause it.
41. 실제 Pearson과 코사인Actual Pearson versus cosine
Apple 두 연도 5품목에서 Pearson≈0.997399876, 원코사인≈0.998906239입니다. 정의와 이동 불변성을 구별하세요.
Distinguish Apple Pearson≈0.997399876 and raw cosine≈0.998906239, including shift behavior.
풀이와 확인할 이유Solution and explanation
Pearson은 각 연도 평균을 뺀 벡터의 코사인입니다. 원코사인은 매출 원점 기준 벡터를 사용합니다. 모든 품목에 상수를 더하면 Pearson은 그대로지만 원코사인은 일반적으로 바뀝니다. 숫자가 비슷해도 같은 통계가 아닙니다.
Pearson uses centered vectors; raw cosine uses origin-based revenues. A shared shift preserves Pearson but generally changes raw cosine. Similar numbers do not make identical definitions.
42. 높은 코사인과 음의 상관High cosine and negative correlation
x=(1,2),y=(2,1)의 Pearson과 원코사인을 구하고 양쪽에10을 더한 결과를 비교하세요.
Compute Pearson and raw cosine for x=(1,2), y=(2,1), then add 10 to both.
풀이와 확인할 이유Solution and explanation
Pearson은 −1이고 원코사인은 4/5=0.8입니다. 이동 후 벡터(11,12),(12,11)의 원코사인은264/265≈0.996226입니다. Pearson은 여전히 −1입니다. 원코사인 높음이 양의 중심화 관계를 뜻하지 않음을 보여 줍니다.
Pearson is −1 and raw cosine 0.8. After shifting, raw cosine becomes 264/265≈0.996226 while Pearson remains −1. High origin-based similarity need not imply positive centered association.
43. 국가 지표의 곱단위Units of national indicators
GDPpc 단위가 불변2015USD/명, 기대수명이 년이면 두 분산·공분산·상관의 단위를 쓰세요.
For GDPpc in constant 2015 US dollars per person and life expectancy in years, state variance, covariance and correlation units.
풀이와 확인할 이유Solution and explanation
분산은 각각 (불변2015USD/명)²와 년²입니다. 공분산은 (불변2015USD/명)·년이고 상관은 무차원입니다. 수치의 크기를 단위 없이 직접 비교하면 다른 양을 비교하게 됩니다.
Variances have squared units, covariance has their product, and correlation is dimensionless. Magnitudes of these different quantities are not interchangeable.
44. 실제 몸무게·날개 분모Changing the complete-pair set
몸무게·날개 모두 유효한342쌍에서 sex까지 요구해333쌍으로 바꾸면 상관이 같은 값이어야 하나요?
Must correlation stay unchanged when 342 mass–flipper pairs are reduced to 333 sex-complete pairs?
풀이와 확인할 이유Solution and explanation
아닙니다. 쌍 집합이 바뀌어 평균·제곱합·교차곱이 모두 달라질 수 있습니다. sex가 필요한 질문이면 그 집합을 설명하고, 필요 없다면 추가 삭제의 이유를 밝혀야 합니다. 한 분모를 모든 질문에 고정하지 않습니다.
No. The paired set and all centered totals can change. Justify required variables and report the resulting inclusion set rather than using one universal denominator.
45. 범위를 제한한 rRestricting the range
높은 x값을 제외하면 r가 항상 감소한다는 규칙이 맞나요? 무엇을 확인해야 하나요?
Does excluding high x values always reduce r? What should be checked?
풀이와 확인할 이유Solution and explanation
보편 규칙은 아닙니다. 곡선·극단값·혼합·잡음 구조에 따라 방향이 달라질 수 있습니다. 제외 전후 산점도, 사용 쌍, 질문과 범위를 기록합니다. 같은 모집단의 같은 통계인 것처럼 조용히 비교하지 않습니다.
No universal direction holds. Inspect scatterplots, included pairs, nonlinear structure and group composition. State the changed range and target explicitly.
46. 상관2라는 결과A reported correlation of 2
공분산2, 두 분산1과1을 넣어 r=2를 얻었습니다. 유효한 같은 기록의 공분산 행렬일 수 있나요?
Covariance 2 and variances 1,1 give r=2. Can these be valid common-record covariance summaries?
풀이와 확인할 이유Solution and explanation
아닙니다. 2²>1·1이라 Cauchy–Schwarz를 위반합니다. 서로 다른 집합·분모·단위·숫자 오차를 섞었는지 확인해야 합니다. 단순히 r를1로 잘라서 계산 문제를 숨기지 않습니다.
No: 4> 1 violates Cauchy–Schwarz. Audit record sets, divisors, units and numerical errors rather than silently clipping the result to one.
47. 한 쌍의 상태One-pair boundaries
x={2},y={5}에서 n분모 공분산과 Pearson, n−1 분산을 구별하세요.
For x={2}, y={5}, distinguish descriptive covariance, Pearson and n−1 variance.
풀이와 확인할 이유Solution and explanation
평균을 빼면 두 편차0이라 기술 공분산0입니다. 두 기술 분산도0이지만 Pearson은0/0이라 미정의입니다. n−1 분산도 분모0으로 미정의입니다. 단일쌍이 독립 관계를 보여 준다는 결론은 없습니다.
Centered deviations give descriptive covariance zero. Pearson is undefined because both SDs vanish, and n−1 variance has zero denominator. One pair establishes no independence claim.
48. 선택 심화: 제곱 underflowOptional: squared-value underflow
정확한 양수 ε에서 x=(0,ε),y=(0,2ε)의 상관과,ε≈10⁻²⁰⁰의 제곱이 기계0으로 저장되는 경우를 구별하세요.
For exact ε> 0, x=(0,ε), y=(0,2ε), find r and distinguish squared underflow when ε≈10⁻²⁰⁰.
풀이와 확인할 이유Solution and explanation
수학적으로 두 벡터는 비상수이고 중심화 후 양의 배수라 r=1입니다. ε² 수준은 binary64에서0으로 내려갈 수 있지만 그것이 원값의 같음을 뜻하지는 않습니다. 정규화한 방향 계산과 underflow 상태를 표시하고 정확한 상수 조건과 분리합니다.
Mathematically r=1 because nonzero centered vectors are positive multiples. Machine-zero ε² does not make the original values constant. Use normalized direction calculations with an underflow status.
49. 추론 가정의 감사Audit inferential assumptions
실제 자료에 ddof1을 선택하고 s/√n을 표시하면 iid와 모집단 대표성이 검증된 것인가요?
Does choosing ddof 1 and displaying s/√n verify iid sampling and representation?
풀이와 확인할 이유Solution and explanation
아닙니다. 소프트웨어 옵션은 산식만 정합니다. 단위·추출·의존·결측·모집단 범위의 가정은 생성 과정에서 검토해야 합니다. 기술량과 추정량의 불확실성에 같은 라벨을 붙이지 않습니다.
No. Options select formulas, not data-generation assumptions. Review units, selection, dependence, missingness and target coverage separately.
50. 종합 검토Integrated audit
보고서가 SD를 평균 SE라 부르고, 상수 r를0으로 채우고, 종별 r를 평균내며, 높은 원코사인을 인과 효과라 씁니다. 고치세요.
A report calls SD a mean SE, fills constant r with 0, averages species r and calls high raw cosine a causal effect. Repair it.
풀이와 확인할 이유Solution and explanation
SD는 값의 흩어짐, SE는 특정 추정량의 반복표집 변동입니다. 상수 r는 미정의이며 전체 r는 같은 쌍의 총공분산·분산으로 계산합니다. 원코사인과 중심화 Pearson을 구별하고 인과 효과에는 별도 식별 근거를 요구합니다. 분모·단위·포함 집합·가정을 함께 다시 기록합니다.
Separate value spread from estimator uncertainty. Mark constant r undefined and compute pooled correlation from common-pair covariance and variances. Distinguish raw cosine, Pearson and causal identification. Record divisors, units, inclusion sets and assumptions.
자료별 확보일·원행 식별·단위·이용 조건은 출처 기록을 확인하세요. 학습 사본은 제공처의 현재 최신 자료와 다를 수 있습니다.Consult each source record for retrieval dates, row identifiers, units and terms. Teaching copies can differ from current provider releases.