질문·관측 단위·추정과 예측의 구분Questions, observational units, estimation and prediction
네 상자의 평균에서 실제 국가·사람·점포의 표적·평가·인과 질문까지From four boxes to actual country, person and store targets, evaluation and causal questions
실습 6종 · 풀이 포함 연습문제 60개6 labs · 60 exercises with solutions
기초Foundations
1. 계산보다 먼저 끝내야 하는 한 문장1. Finish one sentence before calculating
학교 매점의 내일 빵 판매량을 알아야 한다고 생각해 봅시다. 지난주 판매량의 평균을 구하는 일, 내일 팔릴 개수를 미리 맞히는 일, 가격을 낮추면 몇 개 더 팔리는지 알아내는 일은 모두 숫자를 쓰지만 서로 다른 문제입니다. 무엇을 알아내려는지 정하지 않으면 아주 정확한 계산으로 엉뚱한 질문에 답할 수 있습니다.
이 장의 출발점은 “누구에 대해, 어느 시점의, 어떤 결과를, 왜 알고 싶은가?”입니다. 이어 관측 단위와 단위를 적고, 실제 관측한 값·가공해 만든 값·추가 가정을 구별합니다. 그 뒤에 평균이나 예측 오차를 계산합니다.
실제 자료는 World Bank의 고정된 2024년 16국가, David Card의 1976년 관련 사람 기록 3,613행, Card–Krueger의 점포 기록 410행입니다. 서로 다른 질문에 자료를 억지로 맞추지 않고, 무엇까지 답할 수 있는지 하나씩 확인합니다.
Imagine planning tomorrow’s bread supply for a school shop. Summarizing last week’s sales, predicting tomorrow’s quantity and learning how a price cut would change sales all use numbers, but answer different questions. An accurate calculation can answer the wrong question.
Begin with “For whom, at what time, which outcome, and for what purpose?” Then specify the observation unit and measurement scale, separating observed values, derived quantities and assumptions. Only then calculate a mean or predictive error.
The actual sources are sixteen selected World Bank countries in 2024, 3,613 person records related to 1976 from David Card’s archive, and 410 Card–Krueger store records. We examine which questions each source can support.
기초Foundations
2. 기술·추정·예측·인과는 목표가 다르다2. Description, estimation, prediction and causation have different targets
기술은 지금 정한 자료 프레임에서 무엇을 관측했는지 정리합니다. 추정은 자료와 근거를 이용해 아직 모르는 모집단 특성 같은 표적을 알아내려 합니다. 예측은 결과를 알기 전에 새 대상이나 미래의 결과를 내놓습니다. 인과는 특정 개입을 달리했을 때 결과가 어떻게 달라질지 묻습니다.
네 이름은 서로 완전히 떨어진 직업이 아닙니다. 한 연구가 기술통계로 출발하여 인과효과를 추정할 수 있고, 예측기를 학습할 때도 모수를 추정할 수 있습니다. 여기서 분류하는 것은 연구 전체의 이름이 아니라 문장에 명시한 주된 목표입니다.
“추정은 과거, 예측은 미래”도 충분하지 않습니다. 아직 결과를 모르는 새 사람의 현재 임금을 예측할 수도 있습니다. 핵심은 적용 대상과 정보가 이용 가능한 시점입니다. 어느 작업에도 불확실성이 생길 수 있습니다.
Description summarizes what was observed in a specified frame. Estimation learns an unknown target such as a population characteristic. Prediction produces an outcome estimate before its answer is available for a new case or future period. Causation asks how outcomes would differ under alternative interventions.
These are not mutually exclusive professions. A causal study can estimate an effect, and a predictive model can estimate parameters. Here classification concerns the primary target stated in a particular question, rather than labeling an entire research program.
“Estimation concerns the past and prediction the future” is insufficient. One can predict a new person’s current, still-unobserved wage. The application target and information timing matter. All four tasks can involve uncertainty.
기초Foundations
3. 모호한 관심을 분석 질문 카드로 바꾼다3. Turn a broad interest into a question card
“우리 경제는 좋은가?”는 출발 관심이지만 아직 계산 가능한 질문은 아닙니다. “보관한 16국의 2024년 1인당 실질 GDP를 국가마다 똑같이 가중한 평균은 얼마인가?”로 바꾸면 대상·시기·변수·단위·가중치가 정해집니다. 그 평균 하나가 행복·분배·자유를 모두 나타낸다고 추가 해석하지 않습니다.
질문 카드에는 대상, 시기, 관측 단위, 결과 변수와 측정 단위, 자료 포함 규칙, 표적, 사용 목적, 계산 또는 식별 근거를 적습니다. 예측이라면 정보 마감 시점과 손실도 적습니다. 처음부터 모든 칸을 수학 기호로 쓰지 않아도 됩니다.
예를 들어 “같은 점포의 다음 조사 시점 FTE를 이전 조사까지만 이용해 예측한다”에는 같은 점포라는 배치 대상과 시간 순서가 들어 있습니다. “새 점포의 FTE를 예측한다”로 바꾸면 필요한 평가 분할도 달라집니다.
“Is our economy doing well?” is an interest, not yet a computable question. “What is the equally country-weighted mean of 2024 real GDP per person for the sixteen retained countries?” fixes the target, time, variable, unit and weights. That one mean does not also measure happiness, distribution and freedom.
A question card records the target units, period, observation unit, outcome and scale, inclusion rule, target quantity, intended use and computational or identification basis. For prediction, add the information cutoff and loss. Ordinary language is sufficient initially.
“Predict the next-wave FTE of the same store using only the previous wave” specifies both deployment units and time order. Replacing it with “predict FTE for a new store” changes the appropriate evaluation split.
기초Foundations
4. 관측한 프레임의 평균은 무엇을 설명하는가4. What does a retained-frame mean describe?
과일 네 상자의 무게가 2, 3, 5, 6kg이라면 네 상자의 평균은 (2+3+5+6)/4=4kg입니다. 네 값을 모두 알고 있으므로 이 네 상자의 평균을 계산하는 데 표집 오차 공식을 먼저 붙일 필요는 없습니다. 측정 오차나 기록 오류 가능성은 별도 문제로 남습니다.
FyˉF={1,2,3,4},=∣F∣1i∈F∑yi=4kg.
여기서 F는 지금 설명할 프레임입니다. 교실의 네 상자와 전국 모든 과일 상자는 다른 대상입니다. 알려진 프레임 평균을 계산한 사실만으로 전국 평균까지 알게 되는 것은 아닙니다.
실제 16국가의 평균도 같은 논리로 읽습니다. 국가를 미리 선택했다는 사실과 그 선택이 어떤 확률표집 설계였다는 주장은 구별해야 합니다. 가용한 관측값에 대한 기술통계라는 설명만으로도 유용한 질문에 정확하게 답할 수 있습니다.
Four boxes weigh 2, 3, 5 and 6kg. Their mean is 4kg. Because all four values are known, calculating this four-box mean does not first require a sampling-error formula. Measurement and recording errors remain separate concerns.
FyˉF={1,2,3,4},=∣F∣1i∈F∑yi=4kg.
F denotes the frame being described. Four classroom boxes and every fruit box in the country are different targets. Knowing the retained-frame mean does not reveal the national mean.
Read the actual sixteen-country mean similarly. A preselected collection is not automatically a probability sample. A precise description of available records can itself answer a useful question.
기초Foundations
5. 모르는 모집단으로 넘어가려면 다리가 필요하다5. Moving to an unknown population requires a bridge
전국 상자의 평균을 알고 싶지만 일부 상자만 보았다면, 누구를 어떻게 골랐는지가 중요해집니다. 큰 상자를 일부러 고른 표본과 모든 상자에 같은 선택 기회를 준 표본은 같은 평균 공식을 써도 전국 평균에 대한 근거가 다릅니다.
모집단 평균 μ라는 표적, 표본에서 만드는 추정량 T(D), 실제 자료를 넣어 얻은 추정값 t를 구별합니다. 표적은 알고 싶은 대상이고, 추정량은 자료를 입력받는 규칙이며, 추정값은 이번 입력에서 나온 숫자입니다. 추정량의 편향·분산은 정한 반복 표집 또는 확률 모형 아래에서 평가합니다.
μ,T(D),t=T(d)
대표성이 부족한 자료도 명시한 모형이나 보조 정보로 더 넓은 표적을 연구할 수 있습니다. 다만 그런 가정을 숨긴 채 관측 평균을 모집단의 사실로 바꾸면 안 됩니다. 이 장은 전 세계나 현재 전체 취업자의 미관측 평균을 새로 식별했다고 주장하지 않습니다.
If only some boxes are observed, how they were selected matters. Deliberately choosing large boxes and giving every box equal selection opportunity provide different support for a national mean, even with the same averaging formula.
Distinguish a target μ, a data-dependent estimator T(D), and its realized estimate t. Bias and variance of a rule are evaluated under a specified sampling design or probability model.
μ,T(D),t=T(d)
A nonrepresentative source can still inform a wider target using explicit models or auxiliary information. Those assumptions must not be hidden. This chapter does not newly identify the unobserved world mean or a current all-worker wage mean.
기초Foundations
6. 정답을 보기 전에 내놓는 숫자가 예측이다6. Prediction must precede access to the answer
내일의 빵 판매량을 40개라고 적어 두었다가 내일 실제 46개가 팔리면 예측 오차를 계산할 수 있습니다. 실제 판매량을 본 뒤 46이라고 적으면 정확한 기록일 수는 있지만, 그 판매량에 대한 사전 예측 성능을 보인 것은 아닙니다.
입력 x와 예측 규칙 f를 이용해 ŷ=f(x)를 만듭니다. 어떤 입력을 쓸 수 있는지는 예측 순간에 따라 정해집니다. 퇴사 후 확정된 사유를 써서 퇴사를 미리 맞히거나, 주문 뒤에 정해지는 배송일을 써서 주문 시 수요를 예측하면 정보 순서가 어긋날 수 있습니다.
예측은 설명할 관계를 찾는 데도 유용하지만 인과효과와 같지는 않습니다. 비를 잘 예측하는 구름이 있다고 해서 구름 사진을 바꾸면 비가 바뀌는 것은 아닙니다. 해당 신호가 관측 과정에서 무엇을 뜻하는지와 실제로 조작할 개입을 구별합니다.
Write tomorrow’s bread forecast as 40 before sales occur. If 46 are later sold, an error can be evaluated. Recording 46 after seeing the answer may be accurate bookkeeping but does not demonstrate an advance forecast.
A rule f maps available inputs x to a prediction. Which inputs are available depends on the prediction moment. A reason finalized after resignation, or a delivery date determined after ordering, may be unavailable for an earlier deployment task.
Predictive relationships can be useful without identifying intervention effects. A cloud signal may predict rain, but editing its photograph does not alter the weather. Distinguish an observed signal from a manipulable intervention.
기초Foundations
7. 같은 대상의 다른 선택을 비교하는 인과 질문7. A causal question compares alternatives for the same units
교육이 높은 집단의 임금이 높다는 관측은 집단 사이의 관계입니다. “같은 사람이 교육을 1년 더 받았다면 임금이 얼마 달라졌을까?”는 다른 질문입니다. 가정환경·진로·능력·지역 같은 다른 차이가 집단 비교에 섞일 수 있습니다.
개입은 가능한 한 구체적으로 적습니다. “교육을 늘린다”에도 의무교육 연장, 장학금, 직업훈련처럼 여러 방식이 있습니다. 대상, 시기, 비교할 대안과 결과 측정 기간이 달라지면 인과 표적도 달라집니다.
관측 자료가 쓸모없다는 뜻은 아닙니다. 비교가 미관측 대안을 대신할 수 있는 조건을 정하고 논증해야 한다는 뜻입니다. 무작위 배정, 자연실험, 통제와 가정 등 식별 설계는 뒤 계량경제학 과정에서 차근차근 배웁니다.
Higher wages in a more-schooled group describe a between-group association. “How would this same person’s wage change with an extra year of schooling?” is different. Background, choices, ability or location can also differ between groups.
Specify interventions concretely. Compulsory-schooling changes, scholarships and vocational training are different ways to alter education. Units, timing, alternatives and outcome horizon define the causal target.
Observational data remain useful. The issue is which conditions allow an observed comparison to stand in for an unobserved alternative. Randomized assignment, natural experiments and identification assumptions are developed later in econometrics.
기초Foundations
8. 질문 분류 실습: 이유까지 설명한다8. Question lab: classify and explain the evidence
국가·사람·점포에서 질문 하나를 고른 뒤 주된 목표를 선택하세요. 단어만 보고 찍지 말고, 이미 관측한 프레임인지, 미관측 모집단인지, 결과를 보기 전의 새 예측인지, 개입의 대안 비교인지 설명합니다.
예컨대 “2024년 16국의 평균”과 “이 자료로 전 세계 국가 평균을 추정”은 숫자가 비슷해 보여도 표적이 다릅니다. “같은 점포의 다음 시점 고용”과 “정책을 바꾸었을 때의 고용”도 다른 근거를 요구합니다.
실습의 정답은 미리 명시한 문장과 목표에 대한 안내입니다. 임의의 연구 문장을 자동으로 읽어 연구 전체를 판정하는 분류기는 아닙니다. 겹치는 연구 목적이 있다면 각 세부 질문을 따로 적으세요.
Choose a question from the country, person or store examples, then select its primary target. Explain whether it concerns retained observations, an unknown wider population, a new answer before observation or intervention alternatives.
“The 2024 sixteen-country mean” and “the world-country mean estimated from these records” target different quantities. The same store’s next-wave employment and employment under a changed policy also require different evidence.
Answers guide the explicitly stated questions. This is not an automatic classifier of arbitrary research prose. If a project combines purposes, state its separate questions.
기초Foundations
9. 한 행이 무엇인지 먼저 읽는다9. Read what one observation represents
표의 행은 종이에 줄을 그은 위치이고 관측 단위는 무엇을 관측했는지에 대한 개념입니다. 한 행이 한 사람일 수도, 한 사람의 하루일 수도, 한 국가의 한 해일 수도 있습니다. 사람×날짜라면 한 사람이 여러 행을 가질 수 있습니다.
한 점포의 전·후 시점이 열 두 묶음에 나란히 들어 있을 수도 있고, 두 행으로 길게 쌓일 수도 있습니다. 표의 모양을 바꾼다고 점포 수가 늘거나 새로운 독립 정보가 생기지는 않습니다.
분석 단위도 목적에 따라 정합니다. 가계 지출 자료에서 사람 수를 세는지, 가계 수를 세는지, 거래 건수를 세는지에 따라 평균의 분모와 해석이 달라집니다. 이 장의 점포 파일은 원래 410행이며 전후 값이 나란히 있습니다.
A row is a storage position; an observation unit states what was observed. It may be a person, a person-day or a country-year. A person-day table can contain several rows for the same person.
A store’s two waves may be side by side in columns or stacked into two rows. Reshaping the table creates neither additional stores nor automatic independent information.
The analysis unit also depends on purpose. Counting people, households or transactions changes a spending mean’s denominator and meaning. The actual store file contains 410 original rows with waves stored side by side.
기초Foundations
10. 기록 수·대상 수·독립 정보량을 구별한다10. Distinguish records, entities and independent information
한 학생의 체온을 아침·점심·저녁 세 번 재면 측정 기록은 세 개지만 학생은 한 명입니다. 기록이 많다는 사실만으로 서로 독립인 학생 세 명을 조사한 것과 같아지지 않습니다. 반대로 같은 사람의 반복 측정은 변화와 개인차를 연구하는 데 중요한 정보입니다.
실제 점포의 완전한 384쌍을 긴 형태로 바꾸면 768개의 시점별 FTE 값이 됩니다. 768개의 서로 다른 점포라고 세면 틀립니다. 같은 점포의 두 관측뿐 아니라 같은 체인·지역·조사 시점의 연결도 고려할 수 있습니다.
독립성은 sourceRow 번호가 다르다는 사실에서 나오지 않습니다. 원행 키는 추적을 돕는 장치이고, 독립성은 자료 생성과 설계에 관한 성질입니다. 표본 수를 적을 때 “원행 410, 완전한 전후 짝 384, 그 짝의 시점별 값 768”처럼 무엇을 셌는지 함께 적습니다.
Three temperature measurements from one student are three records but one student. They are not automatically equivalent to three independent students. Repeated measurements can nevertheless reveal valuable within-person change.
Stacking 384 complete store pairs yields 768 wave-specific FTE observations, not 768 different stores. Dependence can arise within stores and through chains, regions or survey periods.
Different source-row numbers do not establish independence. They provide traceability; independence concerns data generation and design. Report what is counted: 410 original rows, 384 complete pairs and 768 wave-specific values in those pairs.
기초Foundations
11. 식별자는 측정량이 아니고 유일성도 확인해야 한다11. Identifiers are not measurements, and uniqueness must be checked
학생 번호 101과 202의 평균 151.5를 계산할 수는 있지만 학업 수준의 평균이라고 해석할 수는 없습니다. 번호는 대상을 찾기 위한 이름이며, 숫자 형식이라고 크기나 차이에 측정 의미가 생기지는 않습니다.
고유 키는 정한 표 안에서 한 행을 모호하지 않게 찾는 열 또는 열들의 조합입니다. 국가 자료에서는 국가 코드만으로 여러 연도·지표의 행을 구별할 수 없습니다. 국가·연도·지표를 함께 확인해야 합니다.
이 장의 sourceRow는 보관한 원파일에서의 1부터 시작하는 행 위치입니다. 파일 순서가 바뀌면 뜻도 달라질 수 있으므로 출처 파일과 해시를 함께 보존합니다. 이것을 영구적인 실세계 개인·점포 식별자로 오해하지 않습니다.
Averaging student codes 101 and 202 produces 151.5 numerically but no measure of attainment. A numeric identifier is a name; arithmetic meaning does not follow from its storage type.
A key uniquely locates a row within a specified table. A country code alone cannot distinguish several years and indicators. The country, year and indicator combination must be checked.
Here sourceRow is a one-based position in an archived original file. Reordering can change its meaning, so preserve the source file and hash. It is not a permanent real-world person or store identifier.
기초Foundations
12. 실제 오류 사례: 코드 407은 두 행에 있다12. Actual audit case: code 407 occurs in two rows
점포 원 public.dat에서 코드 407은 원행 42와 168에 각각 나타납니다. 원행 42는 PA의 체인 2 기록이며 FTE가 11에서 11로 갑니다. 원행 168은 NJ의 체인 4 기록이며 12에서 14.5로 갑니다. 코드가 같아도 나머지 정보는 다릅니다.
코드 407만으로 전후 자료를 연결하면 서로 다른 행을 잘못 연결할 위험이 있습니다. 같은 코드니까 하나를 지우는 처리도 원정보를 잃습니다. 현재 원파일에서는 각 행 안의 전후 열을 같은 원행끼리 짝짓고 두 행을 모두 보존합니다.
이 사례의 결론은 모든 중복을 무조건 보존하라는 규칙이 아닙니다. 중복 코드가 같은 대상을 뜻하는지, 다른 기록인지, 실제 입력 중복인지 출처와 키 설계를 확인하라는 뜻입니다. 여기서는 서로 다른 원행이라는 사실을 보존합니다.
In public.dat, store code 407 appears at original rows 42 and 168. Row 42 is chain 2 in PA, changing from 11 to 11 FTE. Row 168 is chain 4 in NJ, changing from 12 to 14.5. The shared code does not make their other information identical.
Linking waves using code 407 alone risks crossing distinct rows. Deleting one row merely because the code repeats also loses source information. Here pair the before and after columns within each original row and retain both records.
This does not prescribe retaining every duplicate blindly. Investigate whether a repeated code denotes the same entity, distinct records or a genuine duplicate entry. In this file, preserve the distinct original rows.
기초Foundations
13. 관측 단위 실습: 원행과 충돌을 추적한다13. Unit lab: trace source rows and collisions
자료를 바꾸어 원행 수, 가용 결과 수, 가용하지 않은 결과 수, 원 코드의 서로 다른 값 수를 비교합니다. 나라 자료에서는 sourceRow가 1부터 16이 아닌 보관한 API 응답 위치라는 점도 확인하세요.
점포를 선택하여 코드 407의 두 원행을 보세요. 전후 변화가 각각 0과 2.5인지 손으로 계산합니다. 그 두 기록을 하나로 합치거나 한 행을 지우면 원행 수와 합계가 어떻게 달라질지 설명하세요.
표에 있는 키가 모두 다르다는 검사는 유용하지만 대표성·독립성·측정 정확성까지 증명하지 않습니다. 점검 결과를 근거가 닿는 범위에서 읽는 것이 첫 번째 분석 습관입니다.
Switch sources and compare original rows, available and unavailable outcomes, and distinct original codes. In the country source, sourceRow refers to the archived API response rather than positions one through sixteen.
Select stores and inspect both rows coded 407. Verify changes zero and 2.5 by hand. Explain how merging or dropping one would alter source counts and totals.
Unique keys are useful checks, but certify neither representativeness nor independence nor measurement accuracy. Interpret each check within its actual scope.
기초Foundations
14. 값·단위·시점·가공식을 함께 읽는다14. Read values together with units, time and transformations
숫자 100만으로는 무엇인지 알 수 없습니다. 100원, 100명, 지수 100은 다른 양입니다. 같은 변수 이름도 현재가격과 불변가격, 월평균과 연말, 가구와 개인 기준이 다를 수 있습니다.
원자료에서 직접 받은 값과 계산한 값도 구별합니다. 두 시점의 차이는 가공 변수이고, 정한 가중식으로 만든 FTE도 가공 변수입니다. 가공이 잘못이라는 뜻이 아니라 무엇을 계산했는지 재현 가능해야 한다는 뜻입니다.
가공식을 바꿀 때는 단위와 빠진 값 처리도 함께 기록합니다. 로그 임금에 100을 곱했다고 달러 임금으로 돌아오지 않습니다. FTE에서 파트타임 가중치 0.5를 다른 값으로 바꾸면 새로운 정의를 계산하는 것입니다.
The number 100 is incomplete without meaning: currency, people and an index are different quantities. A variable name can hide current versus constant prices, monthly averages versus year-end values, or households versus persons.
Separate provider-reported values from derived quantities. A between-wave difference and a weighted FTE definition are transformations. Transformations are legitimate when their rules can be reproduced.
Record units and missing-value handling whenever the formula changes. Multiplying log wages by 100 does not recover dollar wages. Altering the part-time weight from 0.5 defines a different FTE measure.
기초Foundations
15. 국가 자료 읽기: 1인당 생산은 개인의 월급이 아니다15. Country measurement: output per person is not an individual wage
NY.GDP.PCAP.KD는 이 자료에서 2015년 불변 USD 기준 1인당 실질 GDP입니다. 한 국가의 연간 생산을 인구로 나눈 집계 지표입니다. 한 사람의 실제 월급도, 분배를 모두 보여 주는 개인 소득 분포도 아닙니다.
나라별 평균을 같은 비중으로 평균하면 한 나라에 한 표를 줍니다. 인구 가중 평균은 사람 수가 많은 나라에 더 큰 비중을 주는 다른 계산입니다. 어느 것이 맞는지는 “무엇을 평균하려는가”에 달려 있습니다.
기간 기대수명 80년을 기준으로 나라를 나누는 것은 설명용 규칙입니다. 그 집계 지표를 특정 개인의 수명으로 읽거나 GDP가 건강을 만들어 낸 크기라고 읽지 않습니다. 나라 관계와 개인 관계가 같다는 보장도 없습니다.
NY.GDP.PCAP.KD here measures real GDP per person in constant-2015 USD. It is annual aggregate production divided by population, not an individual’s monthly pay or the full personal-income distribution.
An equally country-weighted mean gives one vote to each country. A population-weighted mean gives larger populations more weight. The question determines which target is intended.
Grouping by period life expectancy at 80 years is an explanatory rule. The aggregate is neither a particular person’s lifetime nor an identified GDP effect on health. Aggregate and individual relationships need not agree.
기초Foundations
16. 개인 자료 읽기: 평균 로그와 평균 임금을 구별한다16. Person measurement: mean log wage differs from mean wage
이 자료의 lwage는 정리된 시간당 임금의 자연로그이며 원 임금의 단위는 센트/시간입니다. 예를 들어 1,000센트와 2,000센트의 평균 로그를 지수로 되돌리면 √(1,000×2,000)≈1,414.21센트입니다. 원 임금의 산술평균 1,500센트와 다릅니다.
둘 다 유용할 수 있지만 이름을 바꾸면 안 됩니다. 평균 로그 임금에 지수를 취한 수는 가용 양의 임금의 기하평균에 해당하며, 이 자료의 결측 603개까지 복원하지는 않습니다.
1976년 관련 남성 기록의 교육 집단 차이는 오늘날 모든 취업자에 대한 결론도, 같은 사람에게 교육을 추가했을 때의 효과도 아닙니다. 실제 역사 자료의 범위를 먼저 이해한 뒤 더 넓은 질문에 필요한 연결 근거를 세웁니다.
lwage is a source-trimmed natural log of hourly wages, originally measured in cents/hour. Exponentiating the mean logs of 1,000 and 2,000 cents yields their geometric mean, about 1,414.21 cents, rather than their arithmetic mean of 1,500.
Both summaries can be useful, but they need correct names. Exponentiating available mean log wages does not recover the 603 unavailable outcomes.
A schooling-group contrast among historical male records is neither a statement about all current workers nor the effect of adding schooling to the same person. Understand the source scope before constructing a bridge to a wider question.
기초Foundations
17. 기업 자료 읽기: FTE의 계산과 변화량17. Store measurement: derive FTE and its change
원자료 확인 프로그램의 정의를 따라 FTE=전일제 인원+0.5×시간제 인원+관리자 수로 계산합니다. 전일제 5명, 시간제 8명, 관리자 1명이면 5+4+1=10FTE입니다. 이 정의가 각 직원의 실제 근로시간 합계를 따로 측정했다는 뜻은 아닙니다.
한 시점의 세 구성요소 중 하나라도 없으면 그 시점 FTE를 계산하지 않습니다. 전후 FTE가 모두 있을 때만 변화량을 계산합니다. 결과적으로 완전한 전후 쌍은 NJ 309개와 PA 75개로 총 384개입니다. 나머지 원행 26개를 삭제한 것처럼 숨기지 않습니다.
관측 변화는 정책이 없는 경우의 변화와 같지 않습니다. 실제 두 시점에서 고용이 달라졌다는 기술과 정책 때문에 얼마나 달라졌다는 인과 주장을 분리해 적습니다.
Use the source check program’s definition: FTE equals full-time staff plus half of part-time staff plus managers. Five full-time staff, eight part-time staff and one manager yield 10 FTE. This is not a separately measured sum of actual hours worked.
Require all three components for each wave and both waves for a change. There are 309 complete NJ pairs and 75 complete PA pairs, totaling 384. Preserve and report the other 26 original rows.
An observed change is not the unobserved change without the policy. Describe the actual waves separately from a claim about how much the policy caused.
기초Foundations
18. 없는 값은 0이 아니며 분모도 바뀐다18. An unavailable value is not zero, and the denominator changes
다섯 사람의 값이 2, 4, 6, 빈칸, 빈칸이라면 가용값 평균은 12/3=4입니다. 빈칸을 0으로 채운 평균 12/5=2.4는 다른 가정을 넣은 계산입니다. 원래 다섯 사람의 미관측 평균은 두 빈칸이 무엇인지에 따라 달라지므로 이 정보만으로 결정되지 않습니다.
실제 사람 자료의 원행은 3,613, 가용 로그 임금은 3,010, 가용하지 않은 값은 603개입니다. 가용값 평균의 분모는 3,010입니다. 원행 수를 보고할 때는 3,613을 함께 적습니다. 이 둘은 서로 다른 질문에 답하는 숫자입니다.
결측을 처리하는 방법은 이후에 배우지만, 어떤 방법도 조용히 원 관측값으로 바꾸어 부르지 않습니다. 가용값만 쓴 결과가 전체 표적에 맞는지는 결측 과정에 관한 조건을 따로 검토해야 합니다.
For values 2, 4, 6, missing and missing, the available-value mean is 12/3=4. Replacing missing values with zero gives 12/5=2.4 under a different assumption. The unobserved five-person mean is not determined without the two missing values.
The actual person source has 3,613 rows, 3,010 available logs and 603 unavailable logs. Divide by 3,010 for the available-value mean and report 3,613 for the original record count. They answer different questions.
Later chapters develop missing-data methods. Imputed values must remain distinguished from original observations, and generalizing complete-case results requires conditions on missingness.
기초Foundations
19. 평균은 값뿐 아니라 가중치도 가진다19. A mean depends on weights as well as values
반 A에 2명이 있고 점수 평균이 10, 반 B에 8명이 있고 평균이 20이라고 합시다. 학생 한 명씩 동등하게 세면 (2×10+8×20)/10=18입니다. 반 하나씩 동등하게 세면 (10+20)/2=15입니다. 계산 실수가 아니라 표적이 다른 것입니다.
두 번째 규칙에서 작은 반의 학생 한 명은 1/(2×2)=1/4의 가중치를 받고 큰 반에서는 1/(2×8)=1/16을 받습니다. “똑같이 평균”이라는 말만으로는 학생에게 같은 비중인지 집단에 같은 비중인지 알 수 없습니다.
분모 n_g는 지금 평균을 계산한 가용값 수입니다. 전체 원행 수와 다를 수 있습니다. 가용하지 않은 값까지 같은 표적으로 다루려면 그 값을 알아내거나 추가 가정이 필요합니다.
Group A has two students with mean 10; group B has eight with mean 20. Equal-student weighting gives 18; equal-group weighting gives 15. The difference reflects targets rather than an arithmetic mistake.
Under the second rule, a student in the small group receives weight 1/4, versus 1/16 in the large group. “Average equally” is incomplete until the object receiving equal weight is specified.
Here n_g counts the available values used in the mean and may differ from original rows. Including unavailable outcomes in the target requires their values or additional assumptions.
기초Foundations
20. 실제 사람·점포 자료에서 가중치를 비교한다20. Compare actual person and store weighting rules
사람 자료의 가용 로그는 교육 12년 이하 1,489개, 초과 1,521개입니다. 사람 균등 평균은 두 집단 평균에 1489/3010과 1521/3010을 곱합니다. 집단 균등 평균은 각각 1/2입니다. 실제 결과는 약 6.261832와 6.260799로 차이가 작지만 정확히 같지는 않습니다.
점포의 가용 변화량은 NJ 309개와 PA 75개입니다. 가용 원행 균등 평균은 약 −0.070443FTE, 주 집단 균등 평균은 약 −0.908333FTE입니다. 주마다 절반의 비중을 주면 작은 PA 집단의 한 행이 상대적으로 더 큰 비중을 갖습니다.
둘 중 숫자가 더 그럴듯한 것을 고르는 방식으로 표적을 정하면 안 됩니다. 질문이 “보관한 가용 점포를 같은 비중으로”인지 “두 주 집단을 같은 비중으로”인지 먼저 적습니다. 어느 평균도 자동으로 정책 효과가 되지는 않습니다.
Available logs number 1,489 for schooling at most 12 years and 1,521 above 12. Equal-person weighting uses 1489/3010 and 1521/3010; equal-group weighting uses halves. Actual means are about 6.261832 and 6.260799: close but unequal.
Available store changes number 309 in NJ and 75 in PA. Equal-row weighting gives about −0.070443 FTE, while equal-state weighting gives −0.908333. Equal state weights increase each PA row’s relative weight.
Do not choose the target by which number looks more appealing. State whether rows or state groups receive equal weight. Neither mean automatically identifies a policy effect.
기초Foundations
21. 가중 규칙이 달라도 이번 숫자는 같을 수 있다21. Different rule descriptions can yield the same weights here
실제 16국가는 기대수명 80년 이상 8개와 미만 8개로 나뉩니다. 각 나라에 1/16을 주는 규칙과 각 집단에 1/2을 준 뒤 집단 안에서 1/8씩 주는 규칙은 이번에는 같은 개별 가중치입니다. 따라서 두 평균은 반올림 때문이 아니라 정확히 같습니다.
2⋅81yˉunits=161,=yˉgroups.
집단 크기가 다르면 개별 가중치는 달라질 수 있습니다. 그 경우에도 집단 평균들이 같으면 최종 평균이 우연히 같을 수 있습니다. “최종 숫자가 같다”, “개별 가중치가 같다”, “모든 가능한 자료에서 같은 규칙이다”는 서로 다른 주장입니다.
실제 사례가 언제나 큰 차이를 보여 주는 것은 아닙니다. 예상했던 이야기에 맞추려고 국가를 지우거나 값·집단을 바꾸지 않고, 이번 프레임에서 확인되는 같은 결과를 그대로 설명합니다.
The sixteen countries divide into eight with life expectancy at least 80 and eight below. Equal-country weighting and half to each group followed by equal weighting within groups both assign 1/16 per country. Equality here is exact, not a rounding artifact.
2⋅81yˉunits=161,=yˉgroups.
Unequal group sizes can produce different individual weights. Even then, equal group means can coincidentally produce the same final mean. Equal numerical results, equal weights and universally identical rules are distinct claims.
Actual cases need not produce dramatic contrasts. Retain the source values and grouping rather than editing them to fit an expected story.
기초Foundations
22. 표적 실습: 누구에게 같은 비중을 주는가22. Target lab: what receives equal weight?
가용 기록 균등과 집단 균등을 번갈아 선택합니다. 총 원행·가용값·가용하지 않은 값, 집단 평균과 집단 선택 확률을 함께 읽으세요. 손으로 두 집단의 가중평균을 구한 뒤 화면과 대조합니다.
국가에서는 두 규칙의 개별 가중치가 같다는 안내를 확인합니다. 사람과 점포에서는 크기가 다른 집단 때문에 결과가 달라집니다. 표시는 읽기 쉬운 소수이고, 원 입력에 대한 정확 분수도 함께 확인할 수 있습니다.
이 실습은 보관한 가용값에 정한 가중 규칙을 적용합니다. 결측 결과를 추정하거나 원자료를 모집단 대표 표본으로 바꾸는 기능은 아닙니다. 질문 카드를 먼저 정하고 숫자를 해석하세요.
Switch between equal available-record and equal-group weighting. Read original, available and unavailable counts together with group means and selection weights. Calculate the two-group weighted mean by hand before comparing.
For countries, confirm that individual weights coincide. For people and stores, unequal group sizes change the result. Readable decimals accompany exact fractions on the original inputs.
The lab applies stated weights to retained available values. It does not estimate missing outcomes or turn the source into a representative population sample. Interpret numbers using the question card.
기초Foundations
23. 연관성을 발견한 뒤 무엇을 더 물어야 하는가23. What follows after detecting an association?
교육 집단의 평균 로그 차이를 발견하면 측정과 분모를 먼저 확인합니다. 그 뒤 “집단 구성은 어떻게 달랐나?”, “언제 정해진 변수인가?”, “같은 모집단에 적용 가능한가?”, “개입의 대안을 대표할 근거가 있나?”를 묻습니다. 큰 차이와 작은 차이 모두 같은 원칙으로 읽습니다.
국가 평균 GDP와 기대수명의 연관은 국가 수준의 관계입니다. 그 관계만으로 한 나라 안에서 특정 개인의 소득을 늘릴 때 수명이 얼마나 달라질지 계산할 수는 없습니다. 집계 수준을 바꾸면 다른 관계를 연구하게 됩니다.
기업의 판매량과 광고비가 함께 늘었다면 광고 효과일 수도 있지만, 수요가 높은 시기에 광고를 더 집행했거나 계절 요인이 둘 다 바꾸었을 수 있습니다. 이 문장은 가능한 설명의 예이며, 이 장의 실제 점포 자료에 광고 변수가 있다는 뜻은 아닙니다.
After detecting a schooling-group log-wage difference, check measurement and denominators, then ask how groups were formed, when variables were determined, where results apply and what could justify an intervention comparison. The same principles apply to large and small differences.
A country-level GDP–life-expectancy association does not determine the effect of raising a particular individual’s income within one country. Changing aggregation level changes the relationship being studied.
Sales and advertising can rise together because of advertising, high demand or seasonality. This is a hypothetical explanation exercise, not a claim that advertising is measured in the actual store source.
기초Foundations
24. 예측 질문에 적용 대상·정보·손실을 붙인다24. Specify deployment, information and loss for prediction
좋은 예측 질문에는 결과 변수만 있지 않습니다. 누구에게 적용할지, 언제 예측할지, 어떤 정보를 그때 쓸 수 있는지, 얼마나 앞을 볼지, 틀림을 어떤 손실로 셀지를 적습니다. 같은 자료로도 목표가 달라지면 적절한 검증이 달라집니다.
예를 들어 “기존 점포 384곳의 후 조사 FTE를 전 조사 정보로 예측한다”와 “자료에 없던 새 점포의 FTE를 예측한다”는 다릅니다. 전자는 같은 점포의 과거를 쓸 수 있고, 후자는 그 점포의 결과를 학습에 이미 넣으면 새 점포 평가가 되지 않습니다.
이번 역사 자료의 고정된 분할은 정보 순서를 이해하는 실습입니다. 실제 앞으로의 성능을 보장하려면 배치 환경과 비슷한 평가 자료, 변화 가능성, 충분한 평가 규모 등을 더 검토해야 합니다.
A prediction question specifies deployment units, prediction time, available information, horizon and loss, in addition to the outcome. Different targets can require different evaluations on the same source.
Predicting the later wave of the same 384 stores differs from predicting a previously unseen store. Past information about the same store can be appropriate for the first target; training on a held-out store’s outcomes undermines a new-store evaluation.
The fixed historical splits here teach information timing. Future performance requires additional consideration of deployment similarity, change and evaluation size.
기초Foundations
25. 정보 마감선 뒤의 변수를 찾아낸다25. Find variables beyond the information cutoff
내일 판매량을 예측하면서 내일 마감 후 계산한 총매출을 입력하면 정답과 거의 같은 정보를 미리 본 셈이 됩니다. 이런 정보 누수는 모델 이름이나 계산 속도로 고쳐지지 않습니다. 예측 순간에 이미 알 수 있었는지를 변수마다 확인해야 합니다.
학생 성적을 학기 초에 예측할 때 학기 말 총점은 쓸 수 없습니다. 반면 전 학기 성적은 그때 이미 알려져 있을 수 있습니다. “성적”이라는 이름만으로 누수인지 판정하지 말고 관측·공개 시점을 적으세요. 나중에 수정된 통계도 당시 실무자가 보았던 값과 다를 수 있습니다.
이 장의 두 시점 점포 실습은 전 시점 FTE로 상수 기준선을 정한 뒤 후 시점을 평가합니다. 후 시점 평균으로 상수를 다시 고르면 후 시점 결과를 이미 사용한 다른 절차가 됩니다. 그 차이를 뒤에서 수치로 확인합니다.
Using tomorrow’s finalized revenue to predict tomorrow’s sales can reveal answer-like information. A model name or faster computation cannot fix this. Check when each input was actually available.
An early-term grade forecast cannot use the final grade. A previous-term grade may be available. Names alone do not establish leakage: record observation and release times. Revised official statistics can also differ from the vintages available to a practitioner then.
The store exercise fixes a constant from before-wave FTE and evaluates later-wave outcomes. Refitting that constant to the later mean uses those later answers and defines a different procedure.
기초Foundations
26. 입력·정답·파생 변수를 구분한다26. Separate features, labels and derived variables
지도학습에서는 입력 특성 X로 결과 Y를 예측하는 규칙을 학습합니다. label 또는 정답이라는 이름은 예측 대상 변수라는 뜻이지 측정에 오류가 전혀 없다는 뜻은 아닙니다. 사람의 판단으로 만든 분류에도 정의와 측정 과정이 있습니다.
같은 열이 어떤 질문에서는 입력이고 다른 질문에서는 결과일 수 있습니다. 교육으로 임금을 예측하면 교육은 입력, 임금은 결과입니다. 교육 자체를 예측하는 질문에서는 역할이 달라집니다. 인과 분석에서는 처치·사전 변수·결과라는 시간적 역할도 구분합니다.
파생 변수에는 사용한 원열을 남깁니다. 점포 변화량에 after 값이 들어가므로 after를 예측할 때 그 변화량을 입력에 넣으면 정답 정보가 섞입니다. 경험=나이−교육−6 같은 변수도 독립 실측 경력이라고 바꾸어 부르면 안 됩니다.
Supervised learning fits a rule mapping features X to an outcome Y. Calling Y a label or ground truth does not guarantee error-free measurement; human-defined categories also have operational definitions.
The same column can be a feature in one task and an outcome in another. Predicting wages from schooling differs from predicting schooling. Causal analysis additionally distinguishes treatment, pre-treatment variables and outcomes.
Document the inputs to derived features. A store change contains its after-wave value, so using that change to predict the after wave reveals answer information. Likewise, age minus education minus six is a derived experience proxy, not separately measured employment history.
기초Foundations
27. 평가 자료를 나누기 전에 배치 질문을 정한다27. Choose the deployment question before splitting
훈련 자료는 예측 규칙을 정하는 데 쓰고, 평가 자료는 그렇게 정한 규칙이 아직 보지 않은 결과에 어떻게 작동하는지 살펴보는 데 씁니다. 그러나 행을 나눴다는 사실만으로 질문에 맞는 평가가 되지는 않습니다.
같은 점포의 전후 행을 양쪽에 섞으면 새 점포를 만나는 상황을 잘 흉내 내지 못할 수 있습니다. 반대로 같은 점포의 미래를 예측하려는 경우 그 점포의 과거가 훈련에 있다는 것 자체는 적절할 수 있습니다. 핵심은 대상과 시간의 일치입니다.
아래 실습의 세 규칙은 모두 고정된 결정적 분할입니다. 원행 번호를 나머지 연산에 넣는다고 무작위 표집이 되지 않습니다. 수업에서 분할 구조를 정확히 재현하려고 사용하며, 그 규칙이 실제 환경에서 대표적이라는 주장은 하지 않습니다.
Training data determine a prediction rule; evaluation data examine its performance on answers not used for fitting. Merely dividing rows does not ensure alignment with the question.
Scattering a store’s two waves across sets may poorly mimic encountering a new store. For forecasting the same store’s future, having its past in training can be appropriate. Match both units and timing.
The three lab rules are fixed deterministic allocations. Applying a remainder operation to source-row numbers is not randomized sampling. These reproducible classroom allocations do not establish representative deployment evaluation.
기초Foundations
28. 훈련·선택·최종 평가의 역할을 분리한다28. Separate fitting, selection and final evaluation
모델 후보를 여러 개 비교하여 성능이 좋은 것을 고르면 그 비교 자료도 선택에 사용한 정보입니다. 계속 같은 평가표를 보고 모델을 바꾸면 마지막 숫자는 이미 선택 과정의 영향을 받습니다. 훈련과 독립이라는 처음 조건이 유지되지 않을 수 있습니다.
보통 학습용 자료로 계수를 맞추고, 별도의 검증 절차로 후보를 정한 뒤, 사용하지 않은 최종 평가에서 정한 절차를 살펴봅니다. 자료가 작으면 교차검증처럼 자료를 효율적으로 쓰는 방법을 배우지만, 시간·단위 구조를 무시해도 된다는 뜻은 아닙니다.
모든 문제에 80:20이라는 비율이 정답인 것은 아닙니다. 예측 기간, 독립 단위 수, 자료 길이, 희귀 결과와 적용 환경을 생각해야 합니다. 이 장은 분할의 목적을 이해하고, 복잡한 선택·교차검증 방법은 이후 장에서 구현합니다.
Comparing candidates uses the comparison data for selection. Repeatedly changing a model after inspecting the same evaluation table can influence the final reported result; its original independence from fitting may no longer hold.
A common workflow fits on training data, selects through a separate validation procedure and assesses the chosen procedure on a final unused evaluation. Cross-validation can use limited data efficiently, while still respecting units and time.
No single split ratio is correct for every task. Consider horizon, independent units, series length, rare outcomes and deployment. Later chapters implement model selection and cross-validation in detail.
기초Foundations
29. 새 점포와 같은 점포의 미래는 다른 평가다29. New-store and same-store-future evaluation differ
새 점포 평가에서는 원행 키가 5의 배수인 완전짝을 평가로, 나머지를 훈련으로 둡니다. 한 점포의 두 시점은 항상 같은 쪽입니다. 실제로 훈련 616개 시점값과 평가 152개 시점값이며, 공유 점포는 0개입니다. 시간 순서 예측 검증을 한 것은 아닙니다.
같은 점포의 후 시점 평가에서는 전 시점 384개를 훈련, 후 시점 384개를 평가로 둡니다. 공유 점포는 384개입니다. 이는 같은 점포의 과거를 활용하는 목표와 맞지만, 실제 앞으로도 같은 분포일 것까지 보장하지는 않습니다.
결정적 교차 행 규칙은 (2×sourceRow+wave)를 5로 나눈 나머지가 0인 관측을 평가로 둡니다. 훈련 614개, 평가 154개, 공유 점포 154개입니다. 이 숫자만 보고 “무작위 평가”나 “좋은 평가”라고 부르지 말고 어떤 질문을 흉내 내는지 따집니다.
For a new-store demonstration, complete pairs whose source-row key is divisible by five enter evaluation; others enter training. Both waves stay together. There are 616 training observations and 152 evaluation observations with zero shared stores. This does not validate a time-ordered forecast.
For the same-store later-wave demonstration, 384 before values train and 384 after values evaluate. All 384 stores are shared. That matches access to the same stores’ past, without guaranteeing future distributional stability.
The deterministic interleaved rule evaluates observations where (2×sourceRow+wave) has remainder zero modulo five. It yields 614 training and 154 evaluation observations, sharing 154 stores. These counts alone establish neither random allocation nor suitable evaluation.
기초Foundations
30. 분할 실습: 공유 점포와 시간 순서를 함께 본다30. Split lab: inspect shared units and time order
먼저 배치 목표를 새 점포 또는 같은 점포의 미래로 고릅니다. 다음으로 세 결정적 분할 중 하나를 선택하고 훈련·평가 행 수, 각 집합의 점포 수, 공유 원행 키 수와 시점 구성을 확인하세요.
“공유 점포 0개면 모든 누수가 없다”도, “공유 점포가 있으면 무조건 누수다”도 지나친 결론입니다. 새 단위 평가와 같은 단위 미래 평가가 다르고, 어떤 변수와 정답을 언제 사용했는지도 확인해야 합니다.
완전짝 384개만 시점별 분할에 사용하며 나머지 26개 원행은 제외 사유와 함께 보존합니다. 이 제외가 더 넓은 점포 모집단에 대한 추론을 자동으로 정당화하지는 않습니다.
Choose new-store or same-store-future deployment, then one of the three deterministic allocations. Inspect training and evaluation rows, unit counts, overlap keys and wave composition.
Neither zero overlap nor positive overlap alone diagnoses every leakage issue. Unit-generalization and same-unit forecasting differ, and variable timing and access to labels also matter.
Wave-specific splitting uses the 384 complete pairs and reports the other 26 original rows as excluded. That restriction does not itself justify inference to a wider store population.
기초Foundations
31. 복잡한 모델 전에 상수 기준선을 만든다31. Build a constant baseline before a complex model
훈련 결과의 평균을 모든 평가 대상에게 똑같이 내놓는 예측은 단순하지만 중요한 비교 기준입니다. 무엇을 입력으로 썼고 정답을 언제 보았는지 분명하기 때문입니다. 복잡한 모델은 같은 평가 목표와 손실에서 이 기준선과 비교해야 합니다.
실제 완전짝의 전 시점 평균은 21.006640625FTE입니다. 이것을 미리 고정해 모든 후 시점 값의 예측으로 사용합니다. 점포별 특성을 쓰지 않는 상수이므로 각 점포를 잘 구별하는 모델이라고 부를 수는 없습니다.
이것은 역사 자료에서 정보 순서를 보이는 계산입니다. 후 시점이 되기 전에 이 규칙을 실제 운영했다는 기록을 새로 만들어 내는 것은 아닙니다. 수업에서 관측된 과거를 이용하여 과거 시점의 정보 제한을 재현하는 실습으로 읽습니다.
Predicting the training-outcome mean for every evaluation case is a simple but useful benchmark. Its information use is clear. Compare complex methods under the same deployment target and loss.
The actual complete-pair before-wave mean is 21.006640625 FTE. Fix it as a constant for every after-wave observation. Because it uses no store-specific features, it is not a model that distinguishes individual stores.
This historical exercise reproduces an information restriction. It does not fabricate evidence that the rule was actually deployed before the later survey.
기초Foundations
32. 오차의 단위와 손실의 선택을 이해한다32. Understand error units and the choice of loss
관측값 y와 예측값 c의 오차를 y−c로 정합니다. 양의 오차는 실제가 예측보다 컸다는 뜻입니다. 오차 평균만 쓰면 +5와 −5가 상쇄되어 잘 맞힌 것처럼 보일 수 있습니다. 절댓값이나 제곱을 평균하는 이유입니다.
MAEMSE=m1i=1∑m∣yi−ci∣,=m1i=1∑m(yi−ci)2.
오차가 2FTE와 −4FTE라면 MAE=(2+4)/2=3FTE, MSE=(4+16)/2=10FTE²입니다. RMSE=√10FTE는 원 결과와 같은 단위입니다. 제곱 손실은 큰 오차에 상대적으로 더 민감합니다.
어떤 손실이 적합한지는 의사결정과 연결됩니다. 재고 부족과 남는 비용이 다르면 대칭 제곱 손실만으로 실무 비용을 표현하지 못할 수 있습니다. 이 장의 MSE는 상수 예측의 성질을 배우기 위한 명시적 선택입니다.
Define error as observed minus predicted. Positive error means the outcome exceeded the prediction. Averaging signed errors can cancel +5 and −5, motivating absolute or squared losses.
MAEMSE=m1i=1∑m∣yi−ci∣,=m1i=1∑m(yi−ci)2.
Errors of 2 and −4 FTE give MAE 3 FTE and MSE 10 FTE². RMSE is √10 FTE, in outcome units. Squaring places relatively greater emphasis on large errors.
Loss should reflect the decision. Unequal stockout and surplus costs need not be represented by symmetric squared loss. Here MSE is an explicit choice for learning constant-predictor properties.
학부 연결 · 선택Undergraduate bridge · optional
33. 자기 자료의 평균이 제곱 손실을 최소화하는 이유33. Why a set’s own mean minimizes constant squared loss
평가값 평균을 ȳ라 하고 상수 c를 쓰면 y_i−c=(y_i−ȳ)+(ȳ−c)입니다. 이를 제곱해 합하면 가운데 교차항에는 Σ(y_i−ȳ)=0이 곱해져 사라집니다. 남는 것은 평균 주위 변동과 평균을 빗나간 벌점입니다.
AMSE(c)=m1i∑(yi−yˉ)2,=A+(c−yˉ)2≥A.
따라서 모든 상수 중 평가 자료 자신의 평균이 그 자료에서 MSE를 가장 작게 만듭니다. 이 명제는 자료 값에 대한 대수 항등식이며 정규분포나 무작위 표집 가정을 필요로 하지 않습니다. m은 양수여야 합니다.
하지만 평가 평균을 계산하려면 평가 정답을 보아야 합니다. 자기 자료에서 최소라는 성질과 그 정답을 보기 전에 배치 가능한 절차라는 성질은 다릅니다. 이 구분을 잊으면 평가표의 작은 숫자에 속을 수 있습니다.
Write y_i−c=(y_i−ȳ)+(ȳ−c). On squaring and summing, the cross term vanishes because deviations from the mean sum to zero. What remains is variation around the mean plus a mean-miss penalty.
AMSE(c)=m1i∑(yi−yˉ)2,=A+(c−yˉ)2≥A.
Thus a nonempty set’s own mean minimizes its constant-predictor MSE. This algebraic identity needs neither a normal model nor randomized sampling.
Computing the evaluation mean requires its answers. In-set optimality and deployment before access to those answers are different properties.
기초Foundations
34. 작은 실제 차이를 과장하지 않고 읽는다34. Read the actual oracle gap without exaggeration
실제 후 시점 평균은 약 20.936198FTE입니다. 전 시점 평균을 상수로 쓴 후 시점 MSE는 약 84.123938FTE², 후 시점 정답 평균을 쓴 oracle MSE는 약 84.118976FTE²입니다. 차이는 약 0.004962FTE²로 작습니다.
oracle은 이미 답을 본 비교자라는 뜻입니다. 더 작은 손실이 나온 것은 위 항등식의 결과이지 실무 예측 모델의 우수성을 보인 것이 아닙니다. 실제 차이가 작아도 정보 사용의 원칙은 같습니다.
자료를 손봐서 큰 실패 사례로 만들지 않습니다. 훈련 평균이 후 시점 평균과 우연히 가까울 수 있고, 다른 자료에서는 멀 수 있습니다. 여기서 배우는 것은 실제 수치와 정보 순서를 함께 정직하게 기록하는 방법입니다.
The actual after-wave mean is about 20.936198 FTE. Using the before mean gives after-wave MSE about 84.123938 FTE²; using the after-answer mean gives 84.118976. The actual gap is small, about 0.004962 FTE².
An oracle here already sees the answers. Its lower loss follows from the identity, not superior deployable prediction. The information-use principle remains even with a small gap.
Do not alter data to manufacture a dramatic failure. Historical means may be close or far apart. Record both the actual numbers and the information restriction honestly.
기초Foundations
35. 손실 실습: 훈련 평균과 정답 평균을 비교한다35. Loss lab: compare training mean with answer mean
세 분할에서 훈련 평균 상수와 평가 정답 평균 oracle을 비교하세요. 예측 상수, 평가 평균, MSE·MAE·오차 표를 읽고 원행 키와 시점을 추적합니다. 훈련 평균을 사용해도 시간과 대상에 맞는 분할인지 따로 확인해야 합니다.
먼저 시간 분할에서 (전 평균−후 평균)²을 계산합니다. MSE 차이와 같은지 확인하고, oracle을 골랐을 때 “평가 정답을 사용했다”는 표시가 켜지는지 보세요. oracle이 미래 정답 없이 만들어지는 규칙이라고 쓰지 않습니다.
상수 하나로 전체 점포를 예측했으므로 이 결과만으로 특징을 학습하는 여러 모델의 순위를 논할 수는 없습니다. 이후 회귀와 머신러닝에서 같은 정보 제한을 지킨 모델들을 공정하게 비교합니다.
Compare the training-mean constant and test-answer-mean oracle under each allocation. Trace predictions, evaluation means, MSE, MAE and individual errors using source-row keys and waves. A training mean still needs a task-appropriate split.
First calculate the squared difference between before and after means under the time split. Match it to the MSE gap and inspect the oracle’s answer-use indicator. Do not present the oracle as available before the outcomes.
This constant comparison does not rank feature-learning models. Later regression and machine-learning chapters compare methods under aligned information restrictions.
기초Foundations
36. 기술 오류·표집 변동·예측 오차·가정 불확실성36. Several different sources of uncertainty
저장된 표를 잘못 읽는 오류, 일부만 표집해서 생기는 변동, 새 결과가 달라서 생기는 예측 오차, 관측되지 않은 대안을 연결하는 가정의 불확실성은 다릅니다. 한 종류를 줄였다고 나머지가 사라지지 않습니다.
정확한 분수 계산은 입력 십진값에 대한 산술 반올림 문제를 줄입니다. 원래 측정의 오차나 대표성 부족을 고치지는 않습니다. 표본 수가 많아져 평균의 변동이 줄어도 잘못된 대상을 계속 골랐다면 표적 차이가 남을 수 있습니다.
결과를 보고할 때 무엇이 검증되었는지 적습니다. “원행 해시와 합계 일치”, “정한 모형 아래 계산”, “보지 않은 대상 평가”, “가정 아래 인과 식별”은 서로 다른 근거입니다. 숫자 뒤의 근거를 독자가 따라갈 수 있어야 합니다.
A parsing error, sampling variation, new-outcome predictive error and uncertainty about unobserved intervention alternatives are different. Reducing one does not eliminate the others.
Exact fractions reduce arithmetic rounding on input decimals. They do not repair measurement error or lack of representativeness. More observations can reduce variation while a persistent target mismatch remains.
Report which evidence was checked: source hashes and totals, calculations under a model, evaluation on unseen cases or causal identification under assumptions. Readers should be able to follow the basis of the number.
학부 연결 · 선택Undergraduate bridge · optional
37. 잠재결과 두 칸 중 실제로는 한 칸을 본다37. Only one of two potential outcomes is observed
이 절부터 네 장의 가상 표를 사용합니다. 실제 국가·사람·점포의 기록이 아닙니다. 대상 i에게 처치가 없을 때 결과 Y_i(0), 있을 때 결과 Y_i(1)을 생각합니다. 같은 시점의 같은 대상에서 실제로 택한 상태의 결과만 관측합니다.
YiTi=(1−Ti)Yi(0)+TiYi(1),∈{0,1}.
이 표기는 처치와 결과가 잘 정의되어 있고 실제 처치의 결과가 해당 잠재결과와 일치한다는 일관성 해석을 사용합니다. 다른 대상의 처치가 나에게 영향을 주는 간섭이 있거나 처치 방식이 여러 종류라면 단순한 두 칸 표를 더 구체화해야 합니다.
개별 효과는 Y_i(1)−Y_i(0), 네 대상의 평균 효과는 그 네 차이의 평균입니다. 표에서 빈칸으로 남은 잠재결과는 아직 관측하지 않은 값이므로 마음대로 사실로 채울 수 없습니다.
From here use four hypothetical tickets, separate from every actual source. For unit i, define Y_i(0) without treatment and Y_i(1) with treatment. At the same time for the same unit, observe only the outcome corresponding to its realized treatment.
YiTi=(1−Ti)Yi(0)+TiYi(1),∈{0,1}.
This uses well-defined interventions and consistency between realized and corresponding potential outcomes. Interference between units or multiple treatment versions require a richer specification than this two-column table.
The individual effect is Y_i(1)−Y_i(0); the four-unit average effect averages those differences. Unobserved cells cannot be silently filled as facts.
기초Foundations
38. 관측 집단 차이 5는 무엇을 비교하는가38. What does the observed group difference of five compare?
가상 대상 a,b는 처치를 받지 않아 관측 결과가 1,3입니다. c,d는 처치를 받아 관측 결과가 6,8입니다. 관측 처치 집단 평균은 7, 비교 집단 평균은 2여서 차이는 5입니다.
YˉT=1−YˉT=0=26+8−21+3=5
이 차이는 서로 다른 두 대상 집단을 비교합니다. c,d가 처치를 받지 않았을 때 값과 a,b가 처치를 받았을 때 값은 표에 없습니다. 따라서 같은 대상들의 평균 처치 효과를 바로 계산한 것은 아닙니다.
무작위 배정이 실제로 있었다면 배정의 반복에 대한 다른 근거를 세울 수 있습니다. 그러나 이 가상 표에 그런 설계를 새로 부여하지 않습니다. 관측 숫자만으로 빈칸을 알아낼 수 있는지 먼저 시험합니다.
Hypothetical units a,b are untreated and observed at 1,3; units c,d are treated and observed at 6,8. The observed treated mean is seven and untreated mean two, giving a difference of five.
YˉT=1−YˉT=0=26+8−21+3=5
This compares different units. The table lacks untreated outcomes for c,d and treated outcomes for a,b, so it does not directly calculate the same units’ average treatment effect.
Actual randomized assignment would provide a different repeated-assignment argument. No such design is added to this hypothetical table. First test what the observed numbers alone determine.
기초Foundations
39. 같은 관측값에 평균 효과 2와 0이 모두 가능하다39. The same observations allow effects of two or zero
세계 A에서 a,b의 미관측 처치 결과를 3,5로, c,d의 미관측 무처치 결과를 4,6으로 가정하면 네 대상의 개별 효과는 모두 2입니다. 평균 효과도 2입니다. 관측 결과 1,3,6,8과 집단 차이 5는 그대로입니다.
세계 B에서는 미관측 네 칸을 1,3,6,8로 가정합니다. 각 대상의 두 잠재결과가 같아져 평균 효과는 0입니다. 하지만 관측 결과와 처치 여부는 A와 완전히 같습니다.
τFτFA=41i=1∑4[Yi(1)−Yi(0)],=2,τFB=0.
두 완성표는 가능한 가정의 예일 뿐입니다. 어느 쪽이 실제 세계인지 발견한 것이 아닙니다. 추가 근거 없이는 관측표가 평균 효과 하나를 결정하지 못한다는 비식별성의 직접적인 증명입니다.
In world A, assume missing treated outcomes 3,5 for a,b and missing untreated outcomes 4,6 for c,d. Every individual effect is two. Observed outcomes 1,3,6,8 and their group difference of five stay unchanged.
In world B, assume missing values 1,3,6,8. Each unit’s two potential outcomes coincide, giving average effect zero. Treatment indicators and observed outcomes remain identical to world A.
τFτFA=41i=1∑4[Yi(1)−Yi(0)],=2,τFB=0.
These completions are hypothetical alternatives, not discoveries about the actual world. They directly show that the observed table alone does not identify one average effect.
기초Foundations
40. 잠재결과 실습: 관측과 가정에 다른 색을 준다40. Potential-outcome lab: separate observations and assumptions
가상 네 대상에서 미관측 네 칸을 바꾸세요. 관측된 네 결과와 집단 차이 5는 고정되고 평균 효과만 바뀌는지 확인합니다. 기본 입력 3,5,4,6은 효과 2, 입력 1,3,6,8은 효과 0을 만듭니다.
처치받지 않은 a,b에는 Y(1), 처치받은 c,d에는 Y(0)을 입력합니다. 서로 다른 종류의 빈칸을 채우는 것이므로 열 제목과 표시를 잘 읽습니다. 가정 칸을 “새로운 실제 자료”라고 부르지 않습니다.
이 실습을 실제 점포 정책 효과의 추정 결과로 인용하면 안 됩니다. 실제 자료는 앞 사례에서 보존하며, 이 네 장은 관측표만으로 결정되지 않는 것을 이해하기 위한 별도의 가상 구성입니다.
Change the four unobserved cells in the hypothetical tickets. Check that observed outcomes and their group difference of five remain fixed while the average effect changes. Inputs 3,5,4,6 give effect two; inputs 1,3,6,8 give zero.
Enter missing Y(1) for untreated a,b and missing Y(0) for treated c,d. Read the column roles carefully. Assumed cells are not newly observed data.
Do not cite this exercise as an estimated policy effect for the actual stores. The four tickets are a separate hypothetical demonstration of what the observed table does not determine.
학부 연결 · 선택Undergraduate bridge · optional
41. 식별은 계산 전에 표적이 하나로 정해지는 문제다41. Identification asks whether evidence determines the target
어떤 관측 정보와 가정을 만족하는 세계가 여러 개일 때, 그 세계들에서 표적 값이 모두 같으면 그 근거 아래 표적이 식별되었다고 말합니다. 방금 두 세계는 관측표가 같아도 표적이 달라 관측표만으로는 식별되지 않는 예였습니다.
식별과 추정은 다른 단계입니다. 표적을 관측 분포의 어떤 양으로 나타낼 수 있어도 유한 자료에서 그 양을 정밀하게 추정하기 어려울 수 있습니다. 반대로 아주 많은 자료로 관측 평균을 정밀하게 계산해도 인과 표적이 식별되지 않는 문제는 남을 수 있습니다.
무작위 배정은 관측 비교와 잠재결과를 연결하는 설계 근거가 될 수 있습니다. 관측 연구의 교환가능성·양의 확률·일관성 같은 조건도 이후에 정확히 배웁니다. 이 장에서는 조건 없이 집단 차이를 효과로 바꾸지 않는 습관과 두 세계 반례를 익힙니다.
Under specified observations and assumptions, a target is identified when every compatible world gives it the same value. Our two worlds share the observed table but differ in their target, demonstrating nonidentification from that table alone.
Identification and estimation are separate stages. An identified functional may still be difficult to estimate precisely with finite data. Conversely, a very precise observed mean does not resolve an unidentified causal target.
Randomized assignment can supply a design-based link. Later chapters develop exchangeability, positivity and consistency precisely. Here learn the two-world counterexample before equating a group contrast with an effect.
기초Foundations
42. 잘 맞히는 예측과 좋은 개입 판단은 다른 평가를 받는다42. Predictive and intervention questions need different evaluations
학교를 오래 다닌 사람이 높은 임금을 받는 경향이 예측에 도움이 될 수 있습니다. 하지만 장학금으로 특정 학생의 교육을 늘렸을 때 임금이 얼마나 바뀔지는 그 예측 관계만으로 정해지지 않습니다. 개입은 입력값을 종이 위에서 바꾸는 것 이상입니다.
반대로 평균 인과효과를 잘 추정했다고 모든 개인의 결과를 정확히 맞힐 수 있는 것도 아닙니다. 평균적인 대안 비교와 개별 결과의 예측 오차는 다른 표적입니다. 목적에 맞는 성능과 근거를 보고해야 합니다.
한 프로젝트에서 예측 모델과 인과 설계가 함께 쓰일 수 있습니다. 그 경우 어떤 부분이 예측을 위한 것이고 어떤 조건이 효과 식별을 위한 것인지 구분해 설명합니다. 단순한 양자택일이 아니라 질문별 역할을 명료하게 하는 작업입니다.
Schooling can help predict wages without determining the effect of a scholarship that changes one student’s schooling. Intervention is more than editing a feature value on paper.
Conversely, estimating an average causal effect well does not guarantee accurate individual outcome forecasts. Average intervention contrasts and individual predictive errors are different targets.
Prediction models and causal designs can coexist in a project. Explain which components support prediction and which assumptions identify effects, rather than treating the approaches as exclusive choices.
관측값 모음 d와 그것이 반복될 수 있는 확률적 자료 D를 구별합니다. P는 정한 관측 단위의 자료 생성 법칙을 나타내고 θ(P)는 그 법칙에서 알고 싶은 표적입니다. T(D)는 자료에서 숫자를 만드는 규칙입니다. 대문자와 소문자는 확률 모형과 이번 실현값을 구분하는 표기입니다.
DZi=(Z1,…,Zn),=(Xi,Yi),θ(P),T(D),t=T(d).
P를 썼다고 관측값들이 독립·동일분포가 되는 것은 아닙니다. 반복 측정이면 결합 법칙과 시간·집단 구조를 더 명시해야 합니다. 이 장의 고정 자료 평균은 우선 알려진 프레임의 함수이며, 무조건 미관측 모집단의 추정량으로 해석하지 않습니다.
인과 표적은 관측 P만으로 충분하지 않고 더 풍부한 잠재결과 법칙 Q의 함수일 수 있습니다. 식별 가정은 θ(Q)를 관측 정보로 연결하는 역할을 합니다. 앞의 두 세계는 같은 관측값을 내놓지만 서로 다른 효과를 허용하는 유한한 예입니다.
Distinguish realized records d from random data D under a specified law P. A target θ(P) is a feature of that law; T(D) is a data-to-number rule and t its realization. Case notation separates a model from the observed realization.
DZi=(Z1,…,Zn),=(Xi,Yi),θ(P),T(D),t=T(d).
Writing P does not establish iid observations. Repeated measurements require a joint law and relevant unit/time structure. A fixed-frame mean is first a function of known records, not automatically an estimate of an unobserved population.
A causal target may depend on a richer potential-outcome law Q. Identification assumptions connect that target to observable information. The two completed tables provide a finite example of different effects compatible with identical observations.
선택 심화Optional extension
44. 심화: 훈련 자료에 고정한 예측 위험44. Advanced: predictive risk conditional on a fitted rule
훈련 자료 d로 만든 규칙 f_d를 고정합시다. 적용할 새로운 관측 Z=(X,Y)의 법칙이 P라면 제곱 손실 위험은 R_P(f_d)=E_P[(Y−f_d(X))²]입니다. 이 기대값이 유한하다는 조건도 필요합니다. 이 위험은 보지 않은 자료를 향한 모형상의 표적입니다.
f_d를 정한 뒤 그와 독립인 P의 동일분포 평가 관측을 얻고 손실이 적분 가능하면, 훈련 자료에 조건부로 평가 손실 평균의 기대값은 이 위험과 같습니다. 이 충분조건은 다른 환경의 자료나 정답을 보고 다시 고른 f_d에 자동으로 적용되지 않습니다.
표본 평가 평균이 위험과 정확히 같다는 뜻도 아닙니다. 유한 자료의 변동이 남습니다. 시간 의존성·집단 의존성·분포 변화가 있으면 적절한 위험 표적과 평가 설계를 다시 정해야 합니다. 여기서는 정확한 정의와 충분조건을 이해하는 데 집중합니다.
Fix the rule f_d trained on d. For a new observation Z=(X,Y) from deployment law P, squared-loss risk is the expected squared error, assuming it is finite. This is a model-based target for unseen outcomes.
If evaluation observations are iid from P and independent of training, with integrable loss and the rule held fixed, their mean loss has this risk as its conditional expectation given training. These sufficient conditions do not automatically cover another environment or a rule retuned after seeing test answers.
Finite evaluation loss need not equal risk exactly. Dependence, time structure and distribution changes require reconsidering the target and design. Focus here on the definition and stated sufficient conditions.
기초Foundations
45. 실습 파일을 내려받아 원행에서 다시 계산한다45. Recompute from source rows using the companion files
아래 Python·R 파일은 같은 실제 자료와 가공 규칙에서 원행 수·가용값 수·집단 평균·점포 상수 손실을 다시 계산합니다. 이 장의 sources 폴더 CSV를 함께 내려받고, 파일에 적힌 상대 경로를 유지하여 실행하세요. 그래프의 반올림 숫자를 베껴 넣는 재현이 아닙니다.
순서는 출처와 해시 확인 → 원행·키·단위 읽기 → 결측을 보존한 가용값 선택 → 집단과 가중치 명시 → 합계·평균·손실 계산 → 결과와 해석 대조입니다. 재현되는 숫자와 그 숫자가 어떤 표적에 답하는지를 따로 적습니다.
원자료를 갱신하면 값과 파일 순서가 바뀔 수 있습니다. 새 보관본에는 새 해시·검색일·가공 기록을 남기고 sourceRow의 뜻을 다시 확인합니다. 이 장의 숫자는 명시한 보관본에 대한 재현값입니다.
The Python and R companions recalculate source counts, available values, group means and constant-predictor losses using the same actual sources and transformations. Download the chapter’s source CSVs and preserve the documented relative paths. This reproduces source-based calculations, not copied rounded chart labels.
Check source and hash, read rows and units, preserve missingness, specify groups and weights, compute summaries, then compare interpretation. Record both numerical reproduction and the target actually answered.
Refreshing a source can change values and ordering. Record a new hash, retrieval date and processing history, then recheck positional keys. The chapter’s numbers refer to its stated archived version.
자료 묶음을 풀고 코드와 실제데이터 폴더를 함께 두세요. 터미널에서 코드 파일이 있는 폴더로 이동해 아래 명령을 실행합니다. 코딩이 처음이라면 손계산과 웹 실습을 먼저 하고, 데이터 사이언스 입문에서 코드를 배운 뒤 돌아와도 됩니다.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.
기초Foundations
46. 미니 프로젝트: 한 자료로 네 질문 카드를 만든다46. Mini project: write four question cards for one source
세 자료 중 하나를 골라 기술·추정·예측·인과 질문을 하나씩 만드세요. 각 질문에 대상·시기·단위·결과·가중치 또는 손실·필요한 근거를 붙입니다. 현재 자료로 답할 수 없는 칸은 빈칸과 필요한 자료로 표시하세요.
기술 질문 한 개는 실제로 계산합니다. 가용 원행 수와 결측 수를 보고하고 단위를 적습니다. 예측 질문은 어떤 배치 목표에 어떤 분할을 쓸지 설계만 해도 됩니다. 인과 질문에서는 잠재결과의 두 대안과 관측하지 못하는 부분을 적습니다.
제출물은 질문 카드 네 장, 재현 가능한 기술통계 한 개, 예측 정보 마감선 그림, 한계 설명입니다. 좋은 답은 모든 질문에 숫자를 억지로 붙이지 않습니다. 자료가 말해 주는 것과 추가 근거가 필요한 것을 정확히 구분합니다.
Choose one source and write a descriptive, estimation, prediction and causal question. Specify units, period, outcome, weights or loss and evidence needed. Mark unanswered parts with the additional data or assumptions required.
Compute one descriptive answer using actual records, available and missing counts and units. For prediction, design a deployment-aligned split. For causation, define the alternatives and identify unobserved outcomes.
Submit four question cards, one reproducible descriptive statistic, an information-cutoff diagram and limitations. A strong answer does not force unsupported numbers onto every question.
기초Foundations
47. 실제 국가·사람·기업 사례를 원자료와 함께 읽는다47. Read actual country, person and store cases with their sources
국가 사례 · “어느 나라가 더 잘사는가?”를 계산 가능한 질문으로 바꾸기
“어느 나라가 더 잘사는가?”에는 소득·건강·분배·주거·자유 등 서로 다른 뜻이 들어 있습니다. 여기서는 질문을 좁혀 “미리 선택해 둔 16개 국가의 2024년 1인당 실질 GDP를 같은 국가 가중치로 평균하면 얼마인가?”라고 묻습니다. 사람 한 명의 월급이 아니라 국가의 연간 생산을 인구로 나눈 집계 지표이며, 단위는 2015년 불변 USD/인입니다. PPP 달러나 현재 환율의 2024년 명목 소득이라고 바꾸어 부르지 않습니다.
관측 단위는 국가×연도이고 지금 고른 단면에는 국가당 한 행이 있습니다. 원 World Bank 응답에는 여러 지표와 연도가 있으므로 ISO 코드 하나만으로 모든 자료의 한 행을 지정할 수는 없습니다. 지표 코드 NY.GDP.PCAP.KD·국가·연도를 함께 확인합니다. sourceRow는 보관한 API 응답 records 배열에서의 1부터 시작하는 위치입니다. 이 위치를 실제 국가의 고유번호나 확률표집의 증거로 해석하지 않습니다.
실제 2024년 16국가 · 선택한 두 지표
국가
원 GDP 지표 행
GDPpc · 2015USD/인
기간 기대수명 · 년
Australia
2161
61,486.38
83.05
Brazil
2206
9,566.75
76.02
Canada
2251
45,061.39
82.11
China
2296
13,119.11
78.02
Germany
2341
44,027.76
80.79
France
2386
39,683.40
82.98
United Kingdom
2431
47,900.97
81.39
Indonesia
2476
4,367.95
71.29
India
2521
2,366.83
72.23
Japan
2566
37,976.64
84.04
Korea, Rep.
2611
37,048.43
83.63
Mexico
2656
10,284.03
75.26
Singapore
2701
68,129.70
83.35
United States
2746
66,856.51
78.89
Viet Nam
2791
4,012.51
74.74
South Africa
2836
5,715.48
66.31
같은 16개 값을 모두 알고 있으므로 이 프레임의 균등 국가 평균 31,100.239은 알려진 기술통계입니다. 이것을 전세계 무작위 국가 표본의 추정치라고 부를 근거는 없습니다. 기대수명 80년 이상/미만의 두 설명용 집단은 이번 프레임에서 각각 8개 국가입니다. 각 집단에 절반씩 가중하면 개별 국가의 가중치가 1/(2×8)=1/16이어서, 이번에는 국가 균등 평균 31,100.239과 정확히 같습니다. 집단 크기가 다르면 두 규칙의 개별 가중치와 결과가 달라질 수 있으므로 언제나 같은 표적이라고 일반화하지 않습니다.
기간 기대수명은 해당 시점 사망률 패턴을 사용한 집단 지표이지 특정 사람의 수명 예측이 아닙니다. 이 지표로 나라를 나누었다고 GDP가 건강을 얼마나 “만들어 냈는지”가 밝혀지지도 않습니다. 교육·제도·인구 구성 등 공동 요인과 역방향 관계를 생각해야 합니다. 2025년 GDP를 예측하려면 언제 이용 가능한 어떤 정보로 예측할지와 이후 평가할 기간을 별도로 정해야 합니다.
먼저 생각한 뒤 풀이 보기: 16국가 모두를 알았으니 세계 인구의 평균 생활수준도 안 것인가요?
아닙니다. 선택한 16국가를 한 나라씩 동등하게 센 평균입니다. 인구가 많은 나라에 더 큰 비중을 주는 표적도, 다른 나라를 포함한 세계 표적도 아닙니다. 국가당 평균을 개인당 분포로 바꾸면 관측 단위와 가중치가 달라집니다. 지표 한 개로 행복이나 분배 전체를 평가할 수도 없습니다.
먼저 생각한 뒤 풀이 보기: 기대수명 집단을 균등 가중하면 원래 국가별 가중치는 어떻게 되나요?
집단 g의 국가 수가 n_g이면 각 국가에 1/(2n_g)의 가중치를 줍니다. 작은 집단의 한 나라가 더 큰 가중치를 받습니다. 집단을 정의할 때 쓴 80년은 설명용 기준이며 자연이 정한 원인·결과의 경계가 아닙니다.
사람 사례 · 교육과 임금에서 설명·추정·예측·인과를 구별하기
David Card가 공개한 원자료에는 1976년의 젊은 남성 관련 기록 3,613행이 있습니다. 한 행은 공개 파일의 한 사람 기록이고, sourceRow는 원 nls.dat의 위치, code는 원 person 코드입니다. 이름·실제 인물을 새로 추정하지 않습니다. 교육 연수는 기록된 수량 변수이고 코드의 큰 숫자는 높은 학력이나 높은 임금을 뜻하지 않습니다. 보관본의 experience=age−education−6도 따로 계산한 변수이지 독립적으로 실측한 경력 기간은 아닙니다.
원 코드북에서 극단값을 정리한 로그 시간당 임금 lwage는 3,010명에게 있고 603명에게는 없습니다. 빈칸은 임금이 0이라는 뜻이 아닙니다. 로그의 바탕이 되는 원 임금 단위는 센트/시간이며, 평균 로그를 곧바로 달러/시간이나 임금 산술평균으로 읽지 않습니다. 지금 평균을 계산할 수 있는 분모는 3,010이고, 원행을 보존하는 분모 3,613과 구별합니다. 이 발췌본만으로 비응답·정리 과정 전체나 전국 남성에 대한 대표성을 보증할 수는 없습니다.
실제 원행·분모와 평균 · 소수 반올림
대상
원행 수
가용값
결측값
가용 평균
모든 가용값
3613
3010
603
6.261832
교육 연수 12년 이하
1806
1489
317
6.163655
교육 연수 12년 초과
1807
1521
286
6.357943
비슷해 보이지만 다른 네 질문
질문 종류
이 자료에서의 예
추가로 필요한 것
기술
가용 3,010명의 평균 로그 임금은?
원 단위·결측·분모 확인
추정
더 넓은 정의된 모집단의 평균은?
모집단·표집·응답 과정과 추론 가정
예측
새 사람의 알려진 교육 정보로 임금은?
배치 시 이용 정보·독립 평가 대상·손실
인과
같은 사람이 교육을 더 받았다면 임금은?
미관측 잠재결과를 연결할 식별 근거
교육 12년 이하/초과로 나눈 평균 차이는 관측된 집단의 기술적 차이입니다. 어느 집단에 속할지 무작위로 정한 것이 아니므로 학습 동기·가정 배경·노동시장 조건 등이 함께 다를 수 있습니다. 이 차이를 “교육 1년의 효과”라고 이름 붙이지 않습니다. 예측에 유용한 관계가 있더라도 특정 사람에게 교육을 더 제공했을 때 생길 변화와는 다른 질문입니다. 추정과 예측 모두 통계적 불확실성을 다룰 수 있으므로 둘을 “확실한 계산/불확실한 계산”으로 나누지도 않습니다.
먼저 생각한 뒤 풀이 보기: 빈 로그 임금을 모두 0으로 채우면 원래 평균을 복원한 건가요?
아닙니다. 603개의 관측하지 못한 값을 0이라는 가정으로 바꾼 것입니다. 0은 로그 척도에서 유효한 수치이므로 평균까지 인위적으로 바뀝니다. 결측값이 있다는 사실과 그 값을 추정·대체한 가정은 별도 열과 기록으로 보존해야 합니다. 이 장에서는 실제 결측을 그대로 남깁니다.
먼저 생각한 뒤 풀이 보기: 가용 사람들을 균등하게 세는 평균과 교육 집단을 균등하게 세는 평균이 왜 다른가요?
첫째는 가용 사람 수가 많은 집단에 그만큼 큰 총가중치를 줍니다. 둘째는 두 집단에 각각 절반씩 줍니다. 어느 쪽도 관측하지 못한 603명의 임금을 알아낸 계산이 아닙니다. 구하려는 표적을 문장으로 먼저 쓰고 그 문장에 맞춰 분모를 정하세요.
점포 사례 · 두 시점을 가진 한 원행과 미래 예측의 정보 시점
Card·Krueger 공개 파일은 뉴저지와 펜실베이니아 패스트푸드 점포 관련 410개 원행에 조사 전후 두 시점 정보를 나란히 기록합니다. 지금의 410은 두 시점 값을 모두 합친 820개의 독립 점포라는 뜻이 아닙니다. 각 원행 안에서 전후를 짝짓고, 같은 점포 계열·같은 지역·같은 조사 시점에서 생길 수 있는 의존성을 자동으로 없애지 않습니다. 실제 점포 변화는 기술할 수 있지만 정책이 없었을 때의 반사실 경로는 별도 가정 없이는 관측되지 않습니다.
학습용 FTE는 원 SAS 확인식에 따라 전일제 인원+0.5×시간제 인원+관리자 수로 계산합니다. 세 요소가 모두 있을 때만 그 시점의 FTE를 만들고, 전후 FTE가 모두 있을 때만 변화량 after−before를 만듭니다. 두 값이 있는 원행은 384개이고 26개는 불완전하게 남깁니다. 조사 상태 코드나 빈칸을 마음대로 고용 0으로 바꾸지 않습니다. FTE는 이 가중치로 환산한 인원이지 원자료에서 독립적으로 센 근무시간 합계가 아닙니다.
실제 원 store 코드 407은 두 번 나옵니다. 원행 42는 체인 2·펜실베이니아, 원행 168은 체인 4·뉴저지이며 값도 다릅니다. 같은 숫자라고 합치거나 한 행을 삭제하면 서로 다른 원기록을 잃습니다. 이 장의 sourceRow는 원 public.dat에서 부여한 1부터 시작하는 위치이며, 원파일과 순서를 함께 보존할 때의 추적용 키입니다. 현실 세계의 영구 점포 번호나 서로 독립인 점포라는 증명이 아닙니다. 세부 조인·중복 점검은 뒤 장에서 다룹니다.
원 코드 407의 서로 다른 두 기록
원행 키
원 store 코드
체인
주
전 FTE
후 FTE
관측 변화 FTE
42
407
2
PA
11.0
11.0
0.0
168
407
4
NJ
12.0
14.5
2.5
예측 질문도 둘로 나눕니다. “보지 못한 새 점포의 값은?”이면 그 점포의 두 시점을 훈련·평가 양쪽에 흩어 놓지 않는 단위 분할을 검토합니다. “이미 아는 점포의 다음 조사 값은?”이면 시간 순서와 당시 이용 가능한 정보에 맞춰 평가합니다. 같은 점포가 양쪽에 있다는 사실만으로 언제나 누수라고 판정할 수도 없고, 무작위 행 분할이라는 이유만으로 새 점포·미래 예측 성능이 검증됐다고 말할 수도 없습니다. 배치 상황을 먼저 정해야 합니다.
간단한 정보 시점 실험으로 완전짝 384개의 전 시점 평균 21.006641을 고정 예측값으로 삼아 후 시점을 맞히면 관측 MSE는 84.123938 FTE²입니다. 후 시점 정답을 이미 보고 그 평균 20.936198을 쓴 비교용 oracle은 84.118976 FTE²입니다. 뒤 값이 작은 것은 정답 집합의 평균이 그 집합의 제곱오차를 최소화하기 때문이며, 실제 배치 전에 알 수 있는 예측 규칙의 우수성을 입증한 것이 아닙니다. 이 계산은 한 고정 자료에서의 시점 비교이며 충분한 미래 성능 검증을 대신하지 않습니다.
같은 원행 안의 전후 값이 한 조사 기록의 짝입니다. 원 코드 407만으로 두 원행을 서로 연결하지 않습니다. 원행 42의 변화는 0, 원행 168의 변화는 2.5 FTE입니다. 원행 순서가 달라지는 새 파일을 받으면 현재 위치 키를 그대로 영구 식별자처럼 재사용하지 말고 파일·원 위치·관계의 근거를 함께 점검해야 합니다.
먼저 생각한 뒤 풀이 보기: 뉴저지와 펜실베이니아의 관측 변화 차이가 곧 정책 효과인가요?
아닙니다. 무엇을 원인으로 바꾼다고 상정하는지, 같은 단위의 미관측 결과를 어떤 비교로 대신할지, 공통 시간 변화나 선택 차이를 어떻게 다룰지가 필요합니다. 본문은 원행과 관측 변화·분모를 확인하는 단계입니다. 뒤 인과 학습의 가정 이름표 실험은 실제 점포자료와 분리하며 실제 정책 효과 수치로 인용하지 않습니다.
자료 읽기: World Bank NY.GDP.PCAP.KD와 SP.DYN.LE00.IN, Card 공개 proximity.zip·njmin.zip의 원 코드북과 확인 프로그램을 함께 사용했습니다. 원자료는 보관 사본의 공개 자료이고 선택·가공 CSV는 아래에서 내려받을 수 있습니다. 화면 소수는 반올림이며 정확 분수 필드는 원자료 산술을 보존합니다. 공개라는 사실이 최신성·무오류·대표성·독립성까지 보증하는 것은 아닙니다.
Country case · Turn a broad living-standards question into a defined target
“Which country enjoys a better standard of living?” may refer to income, health, distribution, housing or freedoms. Narrow it to: “What is the equally country-weighted mean of 2024 real GDP per person in these sixteen prespecified countries?” GDP per person is an aggregate annual production measure divided by population, not an individual monthly wage. Its unit here is constant-2015 USD/person, not PPP dollars or nominal 2024 income at current exchange rates.
The observation unit is country-by-year; this selected cross-section has one row per country. The original World Bank response contains multiple indicators and years, so ISO code alone does not identify a row in the full source. Use indicator NY.GDP.PCAP.KD, country and year together. sourceRow is the one-based position in the archived API records array, not an intrinsic country identifier or evidence of random sampling.
Actual 2024 observations for the sixteen selected countries
Country
Original GDP record row
GDPpc · 2015USD/person
Period life expectancy · years
Australia
2161
61,486.38
83.05
Brazil
2206
9,566.75
76.02
Canada
2251
45,061.39
82.11
China
2296
13,119.11
78.02
Germany
2341
44,027.76
80.79
France
2386
39,683.40
82.98
United Kingdom
2431
47,900.97
81.39
Indonesia
2476
4,367.95
71.29
India
2521
2,366.83
72.23
Japan
2566
37,976.64
84.04
Korea, Rep.
2611
37,048.43
83.63
Mexico
2656
10,284.03
75.26
Singapore
2701
68,129.70
83.35
United States
2746
66,856.51
78.89
Viet Nam
2791
4,012.51
74.74
South Africa
2836
5,715.48
66.31
Because all sixteen values are known, their uniform-country mean 31,100.239 is a known descriptive statistic of this frame. The selection is not established as a random sample of all countries. The two illustrative groups—period life expectancy at least 80 years versus below 80—each contain eight countries in this frame. Giving each group half the total weight assigns every country 1/(2×8)=1/16, so here the result is exactly the same uniform-country mean 31,100.239. With unequal group sizes the rules can assign different weights and yield different results; this equality does not hold for every frame.
Actual rows, denominators and means · rounded decimals
Target
Source rows
Available
Unavailable
Available-value mean
All available values
16
16
0
31,100.238572
Period life expectancy ≥80 years
8
8
0
47,664.331759
Period life expectancy <80 years
8
8
0
14,536.145385
Period life expectancy summarizes a population under that period’s mortality pattern; it does not predict a particular person’s lifespan. Grouping by it does not identify how much GDP causes health. Common factors and reverse relationships remain possible. Predicting 2025 GDP requires a separate information cutoff, prediction rule and later evaluation period.
Think first, then reveal: Do all sixteen known countries reveal the world population’s average living standard?
No. The target gives each selected country equal weight. Population weighting or a worldwide frame would define a different target. Moving from countries to individuals changes units and weights, and one production indicator cannot summarize well-being or distribution.
Think first, then reveal: What country weights result from equal group weighting?
Each country in group g receives weight 1/(2n_g). Countries in a smaller group receive more weight. The 80-year threshold is an illustrative grouping rule, not a natural causal boundary.
Person case · Separate description, inference, prediction and causation in schooling and wages
David Card’s public source contains 3,613 records concerning young men in 1976. Each row is one person record in the public file: sourceRow is its position in nls.dat and code is the original person code. Do not infer names or real identities. Schooling years are a recorded quantitative variable; a larger identifier does not imply higher schooling or wages. The retained variable experience=age−education−6 is derived, not a separately observed work-history duration.
Source-trimmed log hourly wages, lwage, are available for 3,010 records and unavailable for 603. A blank is not a zero wage. The underlying source hourly wage is in cents/hour; a mean log is neither dollars/hour nor the arithmetic mean wage. The available-value mean has denominator 3,010, distinct from the retained-record count 3,613. This extract alone does not certify all nonresponse/trimming mechanisms or representativeness of all men.
Actual rows, denominators and means · rounded decimals
Target
Source rows
Available
Unavailable
Available-value mean
All available values
3613
3010
603
6.261832
Schooling ≤12 years
1806
1489
317
6.163655
Schooling >12 years
1807
1521
286
6.357943
Four questions that need different evidence
Question
Example
Additional requirement
Description
Mean log wage in the 3,010 available records?
Units, missingness and denominator
Inference
Mean in a specified wider population?
Population, selection/response and inference assumptions
Prediction
Wage for a new person from available schooling information?
Deployment information, separate evaluation target and loss
Causation
Wage if that same person had received more schooling?
Differences between schooling-at-most-12 and schooling-above-12 groups describe observed groups. Group membership was not randomized; motivation, background and labor-market conditions can differ. This is not an effect of one extra schooling year. A useful predictive association also differs from the change caused by providing additional education to a particular person. Both inference and prediction can involve uncertainty; their distinction is not simply certain versus uncertain calculation.
Think first, then reveal: Would replacing every unavailable log wage with zero restore the original mean?
No. That replaces 603 unobserved quantities with an assumption. Zero is a numerical value on the log scale and changes the mean. Preserve missingness separately from any later estimated/imputed values; this chapter leaves the original unavailable values missing.
Think first, then reveal: Why can equal-person and equal-schooling-group means differ?
Equal-person weighting gives a larger group proportionally more total weight; equal-group weighting assigns half to each group. Neither reveals the 603 unavailable wages. Write the target in words before choosing its denominator.
Store case · One source record with two waves and an honest information cutoff
The Card–Krueger public file has 410 original records for fast-food establishments in New Jersey and Pennsylvania, with two survey waves stored side by side. These are not 820 independent establishments. Pair waves within the same source row. Shared chains, regions or survey periods do not automatically become independent. Observed employment changes can be described, while the counterfactual path without a policy is not observed without additional identification assumptions.
Following the source SAS check, derive FTE as full-time staff +0.5×part-time staff +managers. Construct a wave’s FTE only when all three components are available, and compute after−before only when both waves are available. There are 384 complete original-row pairs and 26 incomplete records retained. Neither a status code nor a blank is arbitrarily turned into zero employment. FTE is a weighted headcount under this definition, not an independently measured sum of hours worked.
Actual rows, denominators and means · rounded decimals
Target
Source rows
Available
Unavailable
Available-value mean
All available values
410
384
26
-0.070443
New Jersey
331
309
22
0.466667
Pennsylvania
79
75
4
-2.283333
Original store code 407 occurs twice: source row 42 is chain 2 in Pennsylvania; row 168 is chain 4 in New Jersey, with different values. Merging them or deleting a row merely because the code repeats loses original information. Here sourceRow is the one-based position in public.dat, a traceability key tied to that archived file and order. It is not a permanent real-world establishment identifier or proof of independence. Later chapters develop joins and duplicate checks.
Two different original records with code 407
Source-row key
Store code
Chain
State
Before FTE
After FTE
Observed change FTE
42
407
2
PA
11.0
11.0
0.0
168
407
4
NJ
12.0
14.5
2.5
Separate two prediction tasks. For a new unseen establishment, consider a unit holdout that does not scatter both waves of that establishment across training and evaluation. For a future wave of an already known establishment, respect time order and information available then. Shared units are not automatically leakage for every deployment task, and a shuffled-row split does not automatically validate new-unit or future performance. Define deployment before choosing the split.
For a simple information-timing experiment, fix the complete-pair before-wave mean 21.006641 as a constant prediction for all 384 after-wave values. Its observed MSE is 84.123938 FTE². An oracle that already sees the after-wave labels and uses their mean 20.936198 attains 84.118976 FTE². The smaller oracle loss follows because a set’s own mean minimizes its squared loss; it does not establish a deployable forecasting advantage. This fixed-data wave comparison does not replace validation on suitable future data.
Think first, then reveal: How should the two records coded 407 be paired?
Pair the before and after values within each original row, not across rows sharing code 407. Row 42 changes by zero; row 168 changes by 2.5 FTE. If a later file changes record order, do not reuse the current positional key as a permanent identifier without checking source, original position and linkage evidence.
Think first, then reveal: Is the observed New Jersey–Pennsylvania difference in changes already a policy effect?
No. Define the intervention and justify how comparisons stand in for unobserved outcomes of the same units, accounting for time changes and selection. Here we verify records, observed changes and denominators. Any later hypothetical-label causal exercise is separate from the actual establishments and must not be cited as an actual policy-effect estimate.
Source reading: World Bank indicators NY.GDP.PCAP.KD and SP.DYN.LE00.IN, plus Card’s public proximity.zip and njmin.zip codebooks/check programs. The archived originals are public data; selected/derived CSVs retain processing records. Displayed decimals are rounded, while exact-fraction fields preserve arithmetic on source values. Public availability alone does not guarantee currency, error-free measurement, representativeness or independence.
기초Foundations
48. 영상·학자·읽기 자료를 질문과 연결한다48. Connect the video, scholar and readings to your questions
본문 영상은 이 페이지 안에서 재생합니다. 시청 전에 입력·결과·적용 대상·평가할 새 자료를 적고, 시청 후 예측과 개입의 차이를 본인 말로 설명하세요. 자료 소개와 학자 소개의 질문에도 먼저 답한 뒤 풀이를 여세요.
Play the video within this page. Before watching, write inputs, outcomes, deployment units and new evaluation cases; afterward explain prediction versus intervention in your own words. Try the scholar and reading questions before revealing answers.
These conceptual readings are distinct from the numerical source archives. Trace actual values to World Bank and Card’s public files. The next chapter develops programming environments and reproducible analysis, translating question cards, units, keys and missingness into code.
본문의 질문을 넓히는 선택 학습입니다. 영상을 보기 전 질문을 먼저 읽고, 자신의 답을 쓴 뒤 해설과 비교하세요. 자료의 언어·선수 지식은 각 항목에 표시했습니다.Optional extensions to the chapter. Read the question first, write your answer, then compare with the explanation. Language and prerequisites are indicated below.
StatQuest · 예측을 배우는 일의 첫 질문StatQuest · A gentle introduction to machine learning
Josh Starmer / StatQuest
입력에서 결과를 예측한다는 기본 구도를 봅니다. 본문 세 사례에 대입하여 배치 시점에 입력이 이미 알려져 있는지, 평가할 새 단위·미래 시점은 무엇인지 적어 보세요. 영상의 입문 설명을 인과 식별이나 미래 성능의 증명으로 쓰지는 않습니다.Watch the basic input-to-prediction setup. For each actual case, specify which inputs exist at deployment and which new units or future periods should be evaluated. Introductory prediction ideas do not establish causal identification or future performance.
교재 안의 YouTube 플레이어에서 재생합니다. 원영상에서 제공하는 자막은 플레이어의 CC·설정에서 선택할 수 있습니다.Playback stays in this chapter’s YouTube player. Available captions can be selected through CC/settings.
보고 읽은 뒤 답하기Respond after watching/reading예측이 잘되면 원인을 바꾸는 효과도 아는 것인가요?Does good prediction identify an intervention effect?
생각을 점검하는 해설Check your reasoning
아닙니다. 관측 관계를 이용한 예측과 같은 단위의 다른 처치 결과를 비교하는 인과 질문은 다른 근거를 요구합니다.No. Predicting from observed relationships and comparing intervention outcomes for the same units require different evidence.
데이비드 카드 · 노동시장 질문을 자료와 연결하기David Card · Connect labor-market questions to data
UC Berkeley Economics · official profile
공식 소개의 임금·교육·최저임금·노동시장 연구 주제를 읽습니다. 이 장의 두 공개 자료가 왜 다른 관측 단위와 질문을 갖는지 비교해 보세요. 이름이 알려진 연구자의 자료라도 각 분석의 단위·가공식·식별 가정을 다시 확인해야 합니다.Read the official profile’s wage, education, minimum-wage and labor-market research topics. Compare the different observation units and questions in the two public sources. A prominent author’s data still require checking units, processing and identification for each analysis.
보고 읽은 뒤 답하기Respond after watching/reading공개 자료를 내려받았다는 사실과 원 논문의 결론을 재현했다는 말은 같은가요?Is downloading public data the same as reproducing the paper’s conclusions?
생각을 점검하는 해설Check your reasoning
아닙니다. 동일 표본·변수·가중치·식별과 추론 절차까지 확인해야 하며 이 장은 원행과 기술통계부터 재현합니다.No. Sample definitions, variables, weights, identification and inference procedures also matter; this chapter begins with records and descriptive quantities.
World Bank · 지표 정의를 먼저 읽기World Bank · Read the indicator definition first
World Bank · WDI metadata glossary
지표 코드·명칭·기준연도·단위·주기를 읽습니다. 이 장에서 선택한 국가 평균과 기관이 제공하는 전체 집계 규칙은 구별하세요. 지표가 연간 집계량이라는 사실만으로 모든 개인의 소득을 알아낸 것은 아닙니다.Read the indicator code, name, base year, unit and frequency. Distinguish this chapter’s selected-country target from the provider’s aggregate rules. An annual aggregate does not reveal all individuals’ incomes.
보고 읽은 뒤 답하기Respond after watching/reading2015 불변 USD를 2024 명목 달러라고 표시해도 되나요?May constant-2015 USD be relabeled nominal 2024 dollars?
생각을 점검하는 해설Check your reasoning
안 됩니다. 가격 기준과 통화 표시가 지표의 의미이므로 그대로 보존해야 합니다.No. Preserve the price basis and currency representation that define the measure.
Data 8 · 관측 단위는 사람이 아니어도 된다Data 8 · Observational units need not be people
Adhikari, DeNero and Wagner · author textbook
제2장 첫 본문의 관측연구·단위·처치·결과·연관과 인과 정의만 읽습니다. 단위가 국가·사람·점포일 수 있음을 본문과 비교하고, 뒤 역사·실험 사례의 수치를 현재 자료에 옮기지 않습니다.Read only the opening definitions of observational study, units, treatment, outcome, association and causation. Compare countries, people and stores as possible units; do not transfer later historical/experimental figures to these sources.
보고 읽은 뒤 답하기Respond after watching/reading한 국가가 한 행이면 그 안의 모든 사람이 같은 결과를 가진 건가요?Does one row per country mean every person in it has the same outcome?
생각을 점검하는 해설Check your reasoning
아닙니다. 국가 집계의 관계와 개인 단위 관계는 다를 수 있으므로 질문과 자료 단위를 일치시켜야 합니다.No. Aggregate and individual relationships can differ; match the question to the data unit.
연습문제 · 계산에서 설명과 증명까지Exercises: calculation, explanation and proof
먼저 혼자 풀고 풀이를 여세요. 숫자와 함께 단위·포함 기준·계산 이유를 확인하세요.Attempt each problem before opening its solution. Check units, inclusion rules and the reason for the calculation.
1. 네 상자의 평균Mean of four boxes
상자 무게 2,3,5,6kg을 모두 관측했습니다. 평균을 구하고 어떤 질문에 답했는지 쓰세요.
All four boxes weigh 2,3,5,6kg. Calculate the mean and state the question answered.
풀이와 확인할 이유Solution and explanation
합계는 16kg, 분모는 관측한 네 상자이므로 평균 4kg입니다. 이 네 상자 프레임의 기술통계입니다. 전국 상자를 확률표집했다는 근거가 없으므로 전국 평균이라고 바꾸어 부르지 않습니다.
The total is 16kg over four observed boxes, giving 4kg. This describes the four-box frame. Without a sampling argument it is not automatically the national box mean.
2. 같은 공식, 다른 목표Same formula, different target
16국가 평균을 계산한 뒤 “세계 모든 국가의 평균이다”라고 썼습니다. 무엇이 빠졌나요?
A sixteen-country mean is reported as the mean of every country in the world. What is missing?
풀이와 확인할 이유Solution and explanation
계산 대상 프레임과 목표 모집단의 연결 근거가 빠졌습니다. 국가 선택·포괄 범위·가중치와 필요한 가정을 밝혀야 합니다. 지금 값은 선택한 가용 16국가의 평균으로 보고할 수 있습니다.
The link between the retained frame and target population is missing. Explain coverage, selection, weights and assumptions. The existing result can be reported as the mean of the sixteen retained available countries.
3. 새 대상의 아직 모르는 결과An unknown outcome for a new case
새 사람의 올해 임금을 결과를 보기 전에 예측합니다. 올해 값이므로 예측이 아니라는 주장은 맞나요?
A new person’s current-year wage is predicted before observing it. Is it not prediction because it concerns the current year?
풀이와 확인할 이유Solution and explanation
아닙니다. 달력의 미래 여부만이 기준이 아닙니다. 적용 대상의 정답을 보기 전에 이용 가능한 정보로 결과를 내놓는 문제입니다. 새 사람과 같은 모집단에 맞는 평가가 필요합니다.
No. Calendar futurity is not the only criterion. The rule supplies an answer before access to that case’s outcome. Evaluation should match new people in the intended deployment population.
4. 교육과 임금의 두 문장Two schooling–wage questions
“교육 집단 간 평균 임금 차이”와 “같은 사람의 교육을 늘릴 때 임금 변화”의 차이를 쓰세요.
Distinguish a schooling-group wage contrast from the wage change if the same person received more schooling.
풀이와 확인할 이유Solution and explanation
첫 문장은 관측 집단의 기술적 연관입니다. 둘째는 같은 대상의 개입 대안을 비교하는 인과 표적입니다. 집단 구성 차이가 있을 수 있으므로 첫 숫자가 자동으로 둘째 답이 되지는 않습니다.
The first describes observed groups; the second compares intervention alternatives for the same units. Differences in group composition prevent automatically equating the two.
5. 추정과 예측의 불확실성Uncertainty in estimation and prediction
“추정에는 불확실성이 없고 예측에만 있다”는 문장을 고치세요.
Correct: “Estimation is certain; only prediction has uncertainty.”
풀이와 확인할 이유Solution and explanation
추정량에도 정한 표집·확률 모형 아래 변동이 있고 측정·선택·가정의 문제도 생깁니다. 예측은 새 결과의 오차를 다룹니다. 두 작업은 확실함과 불확실함이 아니라 주된 표적과 정보 시점으로 구분합니다.
Estimators vary under sampling or probability models and can face measurement, selection and assumption issues. Prediction evaluates new-outcome errors. The distinction concerns targets and information timing, not certainty versus uncertainty.
6. 질문 카드 완성Complete a question card
“점포 고용을 알아본다”를 같은 점포 미래 예측의 구체적인 질문으로 바꾸세요.
Turn “study store employment” into a specific same-store future prediction question.
풀이와 확인할 이유Solution and explanation
예: “완전짝으로 남은 384개 점포의 후 조사 FTE를 전 조사 정보만으로 예측하고, 같은 384개 후 조사 결과의 MSE로 평가한다.” 대상·시점·정의·정보 제한·손실이 들어 있습니다. 역사 분할이라는 범위와 불완전 26행 제외도 보고합니다.
For example: predict later-wave FTE for the 384 complete-pair stores using only before-wave information and evaluate MSE on those later outcomes. Report the historical scope and 26 excluded incomplete records as well.
7. 학생 세 번 측정One student measured three times
학생 10명에게 하루 세 번씩 체온을 쟀습니다. 행·학생·독립성에 대해 무엇을 적나요?
Ten students have three temperature measurements each. What can be said about records, students and independence?
풀이와 확인할 이유Solution and explanation
빠진 측정이 없으면 기록 30개, 학생 10명입니다. 같은 학생의 반복값이므로 30명의 독립 학생이라고 세지 않습니다. 학생 간 또는 시간 간 독립도 설계를 확인해야 합니다. 반복 측정이 무가치하다는 뜻은 아닙니다.
With no missing measurements, there are 30 records and ten students. These are not 30 independent students. Independence across students or times also needs a design argument; repeated measurements remain useful.
8. 넓은 표를 긴 표로 바꾸기Reshape wide pairs to long observations
완전한 점포 384행에 전후 FTE가 있습니다. 긴 표로 바꾸면 몇 행이며 점포 수는 어떻게 되나요?
There are 384 complete store rows with before and after FTE. How many long-format rows and stores result?
풀이와 확인할 이유Solution and explanation
각 원행에서 두 시점 행을 만들므로 768행입니다. 추적 가능한 원행 단위는 그대로 384개입니다. 원행 키와 wave를 함께 보존합니다. 표 모양을 바꿔도 새 점포나 독립성을 만들어 내지는 않습니다.
Two waves per original row produce 768 observations while preserving 384 original-row units. Retain the source key and wave. Reshaping does not create new stores or independence.
9. 국가 코드가 충분한가Is a country code sufficient?
한 파일에 같은 국가의 2023·2024년 GDP와 기대수명이 있습니다. 국가 코드 하나가 행 키인가요?
A file contains 2023 and 2024 GDP and life expectancy for each country. Is country code alone a row key?
풀이와 확인할 이유Solution and explanation
아닙니다. 같은 국가 코드가 연도와 지표마다 반복됩니다. 국가·연도·지표 조합의 유일성을 확인해야 합니다. 실제 API 보관본의 sourceRow는 그 보관본 위치를 추적하는 별도 키입니다.
No. The code repeats across years and indicators. Check uniqueness of country, year and indicator together. The archived API sourceRow separately traces a position in that version.
10. 식별자 평균의 의미Meaning of an identifier average
점포 코드 100,200,300의 평균이 200입니다. 평균 규모가 200이라는 해석은 가능한가요?
Store codes 100,200,300 average to 200. Does that imply mean store size of 200?
풀이와 확인할 이유Solution and explanation
아닙니다. 코드는 이름이고 규모 측정값이 아닙니다. 코드에 산술을 할 수 있다는 것과 그 차이가 의미 있는 수량이라는 것은 다릅니다. 규모를 분석하려면 FTE 같은 정의된 수량 변수를 써야 합니다.
No. Codes name records rather than measure size. Arithmetic availability does not confer quantitative meaning. Use an explicitly measured or derived size variable such as FTE.
11. 코드 407의 두 변화Two changes under code 407
원행 42는 FTE 11→11, 원행 168은 12→14.5이고 둘 다 code=407입니다. 변화와 보존 규칙을 쓰세요.
Row 42 changes 11→11 and row 168 changes 12→14.5 FTE; both have code 407. Give the changes and retention rule.
풀이와 확인할 이유Solution and explanation
각각 0FTE와 2.5FTE입니다. 각 원행 안에서 전후를 짝짓고 두 원행을 모두 보존합니다. 원코드만으로 합치면 체인·주도 다른 기록을 혼동합니다. 이 위치 키는 해당 보관본과 연결해서 사용합니다.
Changes are zero and 2.5 FTE. Pair within original rows and retain both. Joining on the repeated code alone confuses records with different chains and states. Positional keys must remain tied to the archive.
12. 유일성과 독립성Uniqueness versus independence
sourceRow 410개가 모두 다르므로 관측도 독립이라는 결론을 평가하세요.
Evaluate: all 410 sourceRow values differ, so the observations are independent.
풀이와 확인할 이유Solution and explanation
유일성은 표의 키 검사이며 독립성은 결합 자료 생성 과정의 성질입니다. 같은 체인·지역·조사 시점 또는 반복 측정의 연결은 다른 키를 가져도 존재할 수 있습니다. 이 검사는 독립성을 보증하지 않습니다.
Uniqueness is a key check; independence is a property of the joint data-generating process. Chain, region, time or repeated-measure connections can remain across distinct keys. The check does not certify independence.
13. GDP 지표의 이름Name the GDP indicator correctly
NY.GDP.PCAP.KD를 “2024년 각 개인의 명목 월급”이라고 쓴 표제를 고치세요.
Correct the label “each individual’s nominal monthly pay in 2024” for NY.GDP.PCAP.KD.
풀이와 확인할 이유Solution and explanation
“2024년 1인당 실질 GDP·2015년 불변 USD/인”으로 표시합니다. 국가의 연간 집계 생산을 인구로 나눈 지표이며 개인 월급도 PPP 지표도 아닙니다. 기준 가격과 단위를 그대로 유지합니다.
Use “2024 real GDP per person, constant-2015 USD/person.” It is annual aggregate output divided by population, not individual monthly pay or a PPP measure. Preserve the price basis and unit.
14. 국가 한 표와 사람 한 표One country versus one person
가상 두 나라의 GDP/명이 10과 30이고 인구가 9와 1입니다. 국가 균등과 인구 가중 평균을 비교하세요.
Two hypothetical countries have GDP/person 10 and 30 and populations nine and one. Compare equal-country and population-weighted means.
풀이와 확인할 이유Solution and explanation
국가 균등은 (10+30)/2=20입니다. 인구 가중은 (9×10+1×30)/10=12입니다. 가중 대상이 달라서 다릅니다. 집계 지표의 인구 가중 평균을 계산해도 개별 소득의 분포까지 알 수는 없습니다.
Equal-country weighting gives 20; population weighting gives 12. They answer different weighting questions. The weighted aggregate still does not reveal the personal-income distribution.
15. 기대수명과 개인 수명Period life expectancy and individual lifetimes
국가 기대수명이 83년이면 모든 개인이 83세까지 산다고 말할 수 있나요?
Does period life expectancy of 83 years mean every person lives to age 83?
풀이와 확인할 이유Solution and explanation
아닙니다. 기간 사망률 패턴으로 만든 집단 지표입니다. 개인별 실제 수명이나 특정인의 미래를 모두 나타내지 않습니다. 국가 집단을 나누는 설명 변수로 쓰더라도 그 해석을 보존합니다.
No. This is a population indicator based on period mortality patterns, not every individual’s realized lifetime or a complete personal forecast. Preserve that interpretation when forming country groups.
16. 평균 로그를 되돌리기Back-transform a mean log
양의 임금 1,000과 2,000센트의 평균 로그에 지수를 취하세요. 산술평균과 비교하세요.
Exponentiate mean log wages for 1,000 and 2,000 cents. Compare the arithmetic mean.
풀이와 확인할 이유Solution and explanation
로그 합의 절반을 지수화하면 기하평균입니다. 약 1,414.21센트이고 산술평균은 1,500센트입니다. 같은 단위로 돌아와도 같은 요약은 아닙니다.
G=exp(2log1000+log2000)=2,000,000≈1414.21.
Exponentiating the average logs gives the geometric mean, about 1,414.21 cents, versus arithmetic mean 1,500 cents. The unit can coincide while the summary differs.
G=exp(2log1000+log2000)=2,000,000≈1414.21.
17. 로그의 0과 결측A zero log versus a missing log
로그 임금 빈칸을 0으로 채우면 임금이 없다는 뜻을 올바르게 표현한 건가요?
Does filling a missing log wage with zero correctly represent no wage?
풀이와 확인할 이유Solution and explanation
아닙니다. 로그 임금 값 0은 원 단위로 exp(0)=1에 해당합니다. ln(0)은 정의되지 않습니다. 로그가 없는 이유도 여러 가지일 수 있습니다. 빈칸을 숫자로 대체한 것은 가정이며 원 관측이 아닙니다. 이 장은 603개를 결측으로 유지합니다.
No. A logged wage value of zero corresponds to an original-unit value exp(0)=1; ln(0) is undefined. Unavailability can have different causes. Filling it is an assumption, not an original observation; this chapter retains all 603 as missing.
18. FTE 손계산Calculate FTE by hand
전일제 5명·시간제 8명·관리자 1명인 점포의 FTE와, 시간제가 10명이 되었을 때 변화를 구하세요.
Find FTE for five full-time staff, eight part-time staff and one manager, then the change if part-time staff become ten.
풀이와 확인할 이유Solution and explanation
처음은 5+0.5×8+1=10FTE, 나중은 5+0.5×10+1=11FTE여서 변화는 +1FTE입니다. 시간제 두 명을 정한 가중치 0.5로 세었습니다. 실제 근로시간을 새로 관측한 것은 아닙니다.
Initially 5+0.5×8+1=10 FTE; later 11 FTE, a change of +1. Two part-time staff receive the stated half weight. This does not newly observe actual hours worked.
19. 불완전한 구성요소An unavailable FTE component
전일제 5명·시간제 빈칸·관리자 1명입니다. FTE를 6이라고 써도 되나요?
Full-time staff are five, part-time unavailable and managers one. May FTE be recorded as six?
풀이와 확인할 이유Solution and explanation
이 장의 규칙에서는 안 됩니다. 시간제를 0으로 가정한 셈이 됩니다. 구성요소가 모두 있어야 해당 시점 FTE를 만들고, 양 시점이 모두 있어야 변화량을 계산합니다. 원행과 결측을 보존합니다.
Not under this chapter’s rule. That assumes zero part-time staff. Require all components for a wave and both waves for a change; retain the row and its missingness.
20. 가용 평균과 0 대치 평균Available mean versus zero-filled mean
값이 2,4,6,빈칸,빈칸입니다. 가용 평균과 0 대치 평균을 구하고 해석하세요.
For 2,4,6,missing,missing, calculate available and zero-filled means and interpret them.
풀이와 확인할 이유Solution and explanation
가용값은 3개이므로 12/3=4입니다. 0 대치는 다섯 값으로 12/5=2.4입니다. 두 빈칸의 실제 값이 0이라는 근거가 없으므로 후자를 실제 다섯 대상의 알려진 평균이라고 부를 수 없습니다.
There are three available values, giving 12/3=4. Zero filling gives 12/5=2.4. Without evidence that the missing outcomes are zero, the second is not the known true five-unit mean.
21. 결측 평균의 두 완성Two completions of missing outcomes
앞의 빈칸 둘이 각각 0,0인 경우와 10,10인 경우 전체 평균을 구하세요. 가용 평균은 변하나요?
Complete those two missing cells as 0,0 or 10,10. Find each full mean. Does the available mean change?
풀이와 확인할 이유Solution and explanation
전체 평균은 각각 12/5=2.4와 32/5=6.4입니다. 원 가용값 2,4,6의 평균 4는 같습니다. 같은 관측값만으로 미관측 전체 평균이 하나로 정해지지 않는 직접적인 예입니다.
Full means are 2.4 and 6.4, while the original available mean remains four. Identical observed values do not determine one full mean without additional information.
22. 실제 사람 자료의 분모Denominators in the actual person source
There are 3,613 source rows, 3,010 available logs and sum 18,848.11407241. Find the available-mean denominator and value.
풀이와 확인할 이유Solution and explanation
분모는 3,010이며 평균은 약 6.261831918입니다. 3,613으로 나누면 결측 603개를 0처럼 취급한 다른 계산입니다. 원행 수·가용값 수·결측 수를 각각 함께 보고해야 합니다.
Divide by 3,010, giving about 6.261831918. Dividing by 3,613 treats the 603 unavailable logs as zero-like contributions. Report original, available and missing counts separately.
23. 실제 교육 집단 가중치Actual schooling-group weights
가용값 1,489개와 1,521개인 두 집단을 사람 균등과 집단 균등으로 평균할 때 집단 비중을 쓰세요.
Two schooling groups have 1,489 and 1,521 available values. Give weights for equal-person and equal-group means.
풀이와 확인할 이유Solution and explanation
사람 균등은 1489/3010과 1521/3010입니다. 집단 균등은 1/2씩입니다. 두 경우 모두 각 집단의 가용 평균을 사용합니다. 전체 원행 수 1806·1807로 가용값 평균에 비중을 주는 것은 또 다른 규칙입니다.
Equal-person weights are 1489/3010 and 1521/3010; equal-group weights are halves. Both use available group means. Weighting those means by original counts 1806 and 1807 would define another rule.
24. 작은 반과 큰 반A small class and a large class
2명 반 평균 10, 8명 반 평균 20입니다. 두 평균 규칙과 개별 학생 가중치를 구하세요.
A two-student class averages ten and an eight-student class twenty. Compute both means and individual weights.
풀이와 확인할 이유Solution and explanation
학생 균등은 18이며 학생마다 1/10입니다. 반 균등은 15이며 작은 반 학생마다 1/4, 큰 반 학생마다 1/16입니다. 집단 균등이라는 말이 모든 개인에게 같은 비중이라는 뜻은 아닙니다.
Equal-student mean is 18 with weight 1/10 each. Equal-class mean is 15, assigning 1/4 per small-class student and 1/16 per large-class student. Equal groups need not mean equal individuals.
25. 실제 국가의 균형 경계The actual balanced country boundary
16국이 기대수명 기준 8개·8개입니다. 두 집단에 1/2씩 주면 개별 국가 가중치는?
Sixteen countries split eight and eight by life expectancy. With half to each group, what is each country’s weight?
풀이와 확인할 이유Solution and explanation
각 나라에 (1/2)×(1/8)=1/16입니다. 국가 균등과 정확히 같아 평균도 같습니다. 이번 균형 프레임의 결과이며 집단 크기가 달라도 언제나 같다는 뜻은 아닙니다.
Each receives (1/2)(1/8)=1/16. This exactly matches equal-country weights and therefore the mean. It is a property of this balanced frame, not every grouping.
26. 숫자가 같다고 가중치도 같은가Equal means need not imply equal weights
2명 집단과 8명 집단의 평균이 둘 다 10입니다. 학생 균등과 집단 균등이 같은 규칙인가요?
Groups of two and eight both average ten. Are equal-student and equal-group weighting identical rules?
풀이와 확인할 이유Solution and explanation
이번 최종 평균은 둘 다 10이지만 개별 가중치는 다릅니다. 첫 규칙은 각 1/10, 둘째는 작은 집단 각 1/4·큰 집단 각 1/16입니다. 집단 평균이 같아서 결과만 일치했습니다.
Both means happen to be ten, but individual weights differ: 1/10 each versus 1/4 in the small group and 1/16 in the large. Equal group means cause coincident results, not identical rules.
27. 실제 점포의 두 평균Two actual store-change means
NJ 309개 변화 합계 144.2, PA 75개 합계 −171.25입니다. 원행 균등과 주 균등 평균을 구하세요.
NJ has 309 changes summing to 144.2; PA has 75 summing to −171.25. Find equal-row and equal-state means.
풀이와 확인할 이유Solution and explanation
원행 균등은 합계 −27.05를 384로 나누어 약 −0.070442708FTE입니다. 주 균등은 두 주의 평균을 절반씩 평균해 −0.908333333FTE입니다. 서로 다른 가중 표적입니다.
Equal rows give −27.05/384, about −0.070442708 FTE. Equal states average the two state means, giving −0.908333333 FTE. These are different weighted targets.
29. 집계 관계를 개인에게 옮기기Transferring an aggregate relationship to individuals
국가 GDP/명과 기대수명의 관계로 개인 소득 1달러 증가의 수명 효과를 계산해도 되나요?
May a country GDP/person–life-expectancy relationship be used directly as an individual one-dollar income effect?
풀이와 확인할 이유Solution and explanation
안 됩니다. 관측 단위와 개입 표적이 모두 달라집니다. 국가 집계 관계는 개인 관계를 정하지 않고, 연관은 인과 식별을 대신하지 않습니다. 개인 자료와 구체적인 개입·측정·식별 근거가 추가로 필요합니다.
No. Both observation unit and intervention target change. Aggregate relationships do not determine individual ones, and association does not replace identification. Additional individual data and a defined intervention and design are needed.
30. 변수 공개 시점Variable release timing
월초 수요 예측에 월말 확정 매출을 넣었습니다. 다음 달 모델이라 부르면 문제가 해결되나요?
A start-of-month demand forecast uses finalized month-end revenue. Does calling it a next-month model solve the issue?
풀이와 확인할 이유Solution and explanation
이름이 아니라 실제 목표 시점과 이용 정보로 판단합니다. 예측 대상 월의 월말 결과라면 월초에 알 수 없습니다. 다음 달을 예측하는 별도 질문이라면 그때 공개된 이전 매출인지 다시 정의하고 평가 시점을 맞춰야 합니다.
Judge actual target time and information, not names. The target month’s final outcome is unavailable at its start. A genuine next-month task must redefine which earlier revenue is available and align evaluation accordingly.
31. 파생 변수 속 정답An answer hidden inside a feature
후 FTE를 예측하는 입력에 전 FTE와 (후 FTE−전 FTE)를 넣었습니다. 왜 문제인가요?
To predict after FTE, features include before FTE and after-minus-before FTE. What is wrong?
풀이와 확인할 이유Solution and explanation
두 입력을 더하면 예측할 후 FTE 자체가 됩니다. 변화량은 후 결과를 사용해 만든 파생 변수이므로 그 결과 전의 예측에서 이용할 수 없습니다. 높은 정확도는 실제 사전 성능의 증거가 아닙니다.
Adding the two features recovers the outcome itself. The change was derived using the after answer and is unavailable for that advance forecast. High accuracy does not demonstrate genuine pre-outcome performance.
32. 새 점포 평가의 배치Allocation for new stores
새 점포 성능을 평가하려는데 한 점포의 전 행은 훈련, 후 행은 평가에 들어갔습니다. 무엇을 재검토하나요?
For unseen-store evaluation, a store’s before row trains and its after row evaluates. What should be reconsidered?
풀이와 확인할 이유Solution and explanation
그 점포의 관측 결과가 이미 훈련에 있어 처음 만나는 점포 상황과 다를 수 있습니다. 점포 단위로 양 시점을 함께 보류하는 설계를 고려하고 적용 대상과 선택 방식을 설명합니다. 단위 분할만으로 대표성까지 확보되지는 않습니다.
The store is already represented in training, unlike a genuinely unseen unit. Consider holding both waves out together and state deployment and selection. Unit separation alone does not establish representativeness.
33. 같은 점포의 미래와 공유Overlap for same-store forecasting
같은 점포 미래 예측에서 전 시점 훈련과 후 시점 평가에 같은 점포가 있는 것 자체가 항상 누수인가요?
Is shared-store identity always leakage when training on before and testing on after for the same stores?
풀이와 확인할 이유Solution and explanation
아닙니다. 같은 점포의 과거를 사용하는 목표에는 적절할 수 있습니다. 후 정답·후에만 알려지는 입력을 미리 쓰지 않았는지, 시간 순서와 배치 환경을 맞췄는지를 따로 확인해야 합니다.
No. Access to the same store’s history can match the task. Separately check later-answer access, later-only inputs, time order and deployment alignment.
34. 분할의 실제 수를 읽기Read actual split counts
완전짝 384개에서 unitHoldout의 훈련·평가 시점값은 616·152입니다. 각각 점포 수와 공유 수는?
For 384 complete pairs, unitHoldout gives 616 training and 152 evaluation observations. Give unit counts and overlap.
풀이와 확인할 이유Solution and explanation
두 시점이 같은 쪽에 있으므로 훈련 308점포, 평가 76점포입니다. 합은 384, 공유는 0입니다. 두 값을 더한 768은 점포가 아니라 시점별 관측 수입니다.
Both waves remain together, giving 308 training stores and 76 evaluation stores, totaling 384 with zero overlap. The 768 combined values count wave observations, not stores.
35. 나머지 규칙은 무작위인가Is a remainder rule random?
sourceRow%5==0인 행을 평가로 정하면 자동으로 20% 무작위 표본이 되나요?
Does assigning sourceRow%5==0 to evaluation automatically create a 20% random sample?
풀이와 확인할 이유Solution and explanation
아닙니다. 파일 순서와 연결된 결정적 규칙입니다. 가용 행만 선택하면 실제 비율도 정확히 20%일 필요가 없습니다. 무작위 배정의 확률 장치나 설계를 새로 주장하지 않고 재현용 분할로 표시합니다.
No. This is deterministic and tied to file order. After restricting to available rows, the fraction need not be exactly 20%. Label it as a reproducible allocation, not a newly claimed random design.
36. 교차 행의 공유 해석Interpret interleaved-row overlap
결정적 교차 행 분할의 훈련 614·평가 154·공유 점포 154라는 결과로 미래 성능이 검증됐다고 말할 수 있나요?
Does an interleaved split with 614 training, 154 evaluation and 154 shared stores validate future performance?
풀이와 확인할 이유Solution and explanation
그 수만으로는 안 됩니다. 이전 시점 평가에 후 시점 자료가 훈련으로 쓰일 수 있고 새 단위 분리도 아닙니다. 목표·시간·이용 변수를 확인해야 합니다. 실습은 그 구조를 드러내는 것이지 미래 성능 보증이 아닙니다.
Not from those counts. Later observations can train while earlier ones evaluate, and units are not held separate. Check target, timing and inputs. The exercise reveals structure rather than guarantees future performance.
37. 상수 기준선의 정보Information in a constant baseline
후 시점 정답을 모를 때 전 평균 21.006640625를 상수 예측으로 정했습니다. 무엇을 사용했고 무엇을 사용하지 않았나요?
Before seeing after answers, a constant prediction is fixed at the before mean 21.006640625. What information does it use?
풀이와 확인할 이유Solution and explanation
완전짝 전 시점 FTE를 평균한 값만 사용합니다. 후 정답과 점포별 특징은 사용하지 않습니다. 완전짝 선택 자체가 사후 가용성 제한인 역사 실습이라는 범위도 보고하며 실제 사전 운영을 입증했다고 하지 않습니다.
It uses only the complete-pair before FTE average, not later labels or store-specific features. Also report that complete-pair restriction is a historical availability choice rather than evidence of actual prior deployment.
38. 오차 상쇄Cancellation of signed errors
두 예측 오차가 +5와 −5입니다. 평균 오차 0이면 완벽한 예측인가요?
Two forecast errors are +5 and −5. Does mean error zero imply perfect prediction?
풀이와 확인할 이유Solution and explanation
아닙니다. 평균은 상쇄되어 0이지만 MAE=5, MSE=25입니다. 부호 평균은 한 방향 치우침을 보는 데 도움을 주지만 개별 오차 크기를 모두 나타내지 않습니다.
No. Signed errors cancel, but MAE is five and MSE 25. Mean error can indicate directional bias without capturing the magnitude of individual errors.
39. 세 가지 오차 척도Three error measures
관측 10,14와 예측 8,18의 MAE·MSE·RMSE를 구하세요. 단위는 FTE입니다.
For outcomes 10,14 and predictions 8,18 FTE, calculate MAE, MSE and RMSE.
풀이와 확인할 이유Solution and explanation
오차는 2,−4입니다. MAE=(2+4)/2=3FTE, MSE=(4+16)/2=10FTE², RMSE=√10≈3.162278FTE입니다. 제곱과 제곱근에서 단위가 어떻게 달라지는지 함께 표시합니다.
Errors are 2 and −4. MAE is 3 FTE, MSE 10 FTE² and RMSE √10≈3.162278 FTE. Track how squaring and square-rooting change units.
40. 상수 손실 항등식 유도Derive the constant-loss identity
m>0에서 Σ(y_i−ȳ)=0을 사용해 MSE(c)=MSE(ȳ)+(c−ȳ)²을 보이세요.
For m>0, use Σ(y_i−ȳ)=0 to prove MSE(c)=MSE(ȳ)+(c−ȳ)².
풀이와 확인할 이유Solution and explanation
y_i−c=(y_i−ȳ)+(ȳ−c)를 제곱하여 더합니다. 교차항 2(ȳ−c)Σ(y_i−ȳ)/m은 0이고 상수항은 (ȳ−c)²입니다. 정규성이나 독립성이 필요 없는 유한 합 항등식입니다.
Expand the centered decomposition. The cross term vanishes, leaving within-set variation plus the squared mean miss. This finite-sum identity needs no normality or independence.
Compare MSE of constants three and four for evaluation values 2,4,6.
풀이와 확인할 이유Solution and explanation
상수 3은 (1+1+9)/3=11/3, 상수 4는 (4+0+4)/3=8/3입니다. 차이 1은 (3−4)²입니다. 평가 평균 4는 평가값을 봐야 정할 수 있으므로 낮은 손실이 곧 사전 배치 가능성을 뜻하지 않습니다.
Constant three gives 11/3; constant four gives 8/3. Their gap is one, equal to (3−4)². Selecting the evaluation mean requires its answers, so lower loss does not establish advance deployability.
42. 작은 실제 oracle 차이The small actual oracle gap
전 평균 21.006640625, 후 평균 20.9361979167입니다. 실제 MSE 차이가 약 .004962라는 사실을 어떻게 해석하나요?
Before and after means are 21.006640625 and 20.9361979167. Interpret the actual MSE gap of about .004962.
풀이와 확인할 이유Solution and explanation
평균 차이의 제곱과 맞는 작은 손실 차이입니다. 정답 평균의 자기 자료 최소화 성질을 확인합니다. 차이가 작다고 정보 누수가 정당화되지 않고, 큰 예측 개선 사례라고 과장해서도 안 됩니다.
It is the small squared-mean-shift penalty predicted by the identity. It confirms the answer mean’s in-set minimizing property. A small gap neither justifies answer access nor supports a dramatic improvement claim.
43. 평가표를 보고 계속 고르기Repeated selection on an evaluation table
100개 모델 중 같은 평가 자료에서 가장 좋은 하나만 골라 그 점수를 독립 최종 평가라고 보고했습니다. 문제는?
The best of 100 models on the same evaluation set is reported with that score as an independent final evaluation. What is wrong?
풀이와 확인할 이유Solution and explanation
그 자료가 모델 선택에 쓰였으므로 선택된 규칙과 평가값이 무관하다는 처음 근거가 유지되지 않습니다. 별도 최종 평가 또는 선택 과정을 반영한 절차가 필요합니다. 낮은 숫자만으로 일반화 성능을 확정하지 않습니다.
The evaluation set participated in selection, breaking the original separation between the chosen rule and evaluation. Use a separate final assessment or an appropriately selection-aware procedure; the low score alone does not establish generalization.
44. 단위 변환과 손실Unit conversion and loss
모든 관측과 예측을 100배 하면 MAE와 MSE는 각각 몇 배가 되나요?
If all outcomes and predictions are multiplied by 100, how do MAE and MSE change?
풀이와 확인할 이유Solution and explanation
오차가 100배이므로 MAE는 100배, MSE는 10,000배입니다. RMSE는 100배입니다. 다른 측정 단위의 원 MSE 숫자를 단위 조정 없이 비교하면 안 됩니다.
Errors scale by 100, so MAE and RMSE scale by 100 and MSE by 10,000. Raw MSE values in different units cannot be compared without accounting for scale.
45. 평가 손실의 기대값Expected holdout loss
훈련 후 f_d를 고정하고, 훈련과 독립인 P의 iid 평가값 m≥1개를 얻었습니다. 아래처럼 적분 가능한 손실 L의 위험과 평가 평균을 정의할 때 평가 평균의 조건부 기대값을 구하세요.
Fix f_d after training and obtain m≥1 iid evaluation cases from P independent of training. Define risk and evaluation mean for an integrable loss L below, then find the conditional expectation of that mean.
Each term has conditional expectation R_P(f_d), so linearity gives the same for the average. This expectation statement does not equate a realized finite evaluation score with risk.
46. 많은 행이 모든 문제를 고치는가Do more rows fix every problem?
한 사람을 천 번 측정했으니 독립인 천 명의 모집단 추정과 같고 선택 편향도 없다는 주장을 평가하세요.
Evaluate: measuring one person a thousand times equals a thousand independent people and eliminates selection bias.
풀이와 확인할 이유Solution and explanation
반복 기록은 한 대상의 변화에 정보를 주지만 서로 다른 독립 대상 천 명을 만들지는 않습니다. 표집 대상과 목표 모집단의 차이도 남습니다. 변동 감소·독립성·대표성을 같은 말로 취급하면 안 됩니다.
Repeated records inform one unit’s changes but do not create a thousand independent people. Target-population mismatch can remain. Reduced variation, independence and representativeness are distinct.
47. 해시가 보장하는 범위What a file hash establishes
파일 SHA가 같으니 변수 정의와 인과 해석도 맞다고 결론내릴 수 있나요?
If a file’s SHA matches, are its variable definitions and causal interpretation necessarily correct?
풀이와 확인할 이유Solution and explanation
아닙니다. 해시는 같은 바이트 보관본인지 확인하는 근거입니다. 정의·단위·가공식·설계·해석의 정확성은 별도로 검토합니다. 해시와 코드북, 처리 기록, 계산 검증을 함께 보존합니다.
No. A matching hash checks the byte-level archive version. Definitions, units, transformations, design and interpretation require separate review. Preserve hashes together with codebooks and processing evidence.
48. 관측되는 잠재결과 칸Which potential-outcome cell is observed?
대상 a는 T=0,Y=1이고 c는 T=1,Y=6입니다. 각 대상에서 관측·미관측 잠재결과는?
Unit a has T=0,Y=1 and c has T=1,Y=6. Which potential outcomes are observed or missing?
풀이와 확인할 이유Solution and explanation
일관성 표기 아래 a의 Y(0)=1은 관측, Y(1)은 미관측입니다. c의 Y(1)=6은 관측, Y(0)은 미관측입니다. 서로 다른 사람의 관측 결과를 같은 사람의 빈칸이라고 채울 수는 없습니다.
Under consistency, a’s Y(0)=1 is observed and Y(1) missing; c’s Y(1)=6 is observed and Y(0) missing. Another unit’s observed result is not automatically the missing outcome for this one.
49. 가상 세계 AHypothetical world A
a,b의 관측 Y(0)=1,3과 가정 Y(1)=3,5, c,d의 관측 Y(1)=6,8과 가정 Y(0)=4,6에서 평균 효과를 구하세요.
For a,b, observed Y(0)=1,3 and assumed Y(1)=3,5; for c,d, observed Y(1)=6,8 and assumed Y(0)=4,6. Find the mean effect.
풀이와 확인할 이유Solution and explanation
개별 효과는 3−1=2,5−3=2,6−4=2,8−6=2입니다. 평균은 2입니다. 관측 집단 차이는 7−2=5로 다른 값입니다. 네 빈칸을 가정한 결과이지 실제 효과를 발견한 것이 아닙니다.
Individual effects are all two, so the mean is two. The observed group contrast remains 7−2=5. This result depends on four assumed missing cells and is not a discovered actual effect.
50. 가상 세계 BHypothetical world B
미관측 칸을 a,b의 Y(1)=1,3 및 c,d의 Y(0)=6,8로 채우면 평균 효과와 관측 집단 차이는?
Fill missing Y(1)=1,3 for a,b and Y(0)=6,8 for c,d. Find mean effect and observed group contrast.
풀이와 확인할 이유Solution and explanation
개별 효과가 모두 0이라 평균 효과는 0입니다. 관측 결과와 처치 집단은 바뀌지 않아 집단 차이는 여전히 5입니다. 관측표만으로 세계 A와 B 중 어느 효과인지 결정할 수 없습니다.
Every individual effect is zero, so the mean effect is zero. Observations and treatment remain unchanged, leaving group contrast five. The observed table alone cannot select between effects in worlds A and B.
51. 관측표로 비식별성을 보이기Demonstrate nonidentification
같은 관측표에 평균 효과 2와 0인 두 완성표가 있습니다. 이것이 보이는 것과 보이지 않는 것은?
Two completed tables share observations but have effects two and zero. What does this establish, and what does it not?
풀이와 확인할 이유Solution and explanation
관측표만이라는 근거 아래 평균 효과가 유일하게 정해지지 않음을 보입니다. 실제 효과가 반드시 0 또는 2라는 뜻도, 어떤 추가 설계로도 연구할 수 없다는 뜻도 아닙니다. 추가 가정과 자료는 가능한 세계의 범위를 줄일 수 있습니다.
It shows the effect is not uniquely determined by the observed table alone. It does not restrict the actual effect to zero or two, nor prove no additional design could help. Further evidence can restrict compatible worlds.
52. 관측 차이를 효과와 선택 차이로 분해Decompose an observed contrast
가상 세계 A에서 c,d의 평균 처치효과와 무처치 잠재결과 집단 차이를 구해 관측 차이 5를 분해하세요.
In world A, find the treated units’ mean effect and the group difference in untreated potential outcomes. Decompose the observed contrast five.
풀이와 확인할 이유Solution and explanation
c,d의 효과 평균은 2입니다. 이들의 Y(0) 평균은 (4+6)/2=5, a,b의 Y(0) 평균은 2라 선택 차이는 3입니다. 합계 2+3=5입니다. 이 분해는 가정한 빈칸을 사용합니다.
The treated units’ mean effect is two. Their untreated mean is five, versus two for untreated units, giving a selection contrast of three. Together they give five. The decomposition uses assumed missing outcomes.
한 학생의 과외가 같은 반 친구의 성적에도 영향을 줍니다. Y_i(0),Y_i(1) 두 칸만으로 충분한가요?
Tutoring one student also affects classmates’ outcomes. Are Y_i(0),Y_i(1) alone sufficient?
풀이와 확인할 이유Solution and explanation
자기 처치 외에 다른 학생의 처치 배치도 결과에 영향을 주므로 단순 두 칸 표가 충분하지 않을 수 있습니다. 누구의 어떤 처치가 결과에 들어가는지 더 구체적인 잠재결과를 정의해야 합니다. 간섭이 없다는 조건을 조용히 가정하면 안 됩니다.
Outcomes also depend on others’ assignments, so two cells indexed only by own treatment may be insufficient. Specify the relevant treatment configuration and richer potential outcomes instead of silently assuming no interference.
54. 관측과 가정을 보존하기Preserve observations separately from assumptions
실습에서 미관측 잠재결과를 바꾼 뒤 실제 CSV에도 그 값을 새 관측처럼 저장하려 합니다. 어떻게 고치나요?
After editing hypothetical potential outcomes, someone wants to save them into the actual CSV as new observations. Correct this.
풀이와 확인할 이유Solution and explanation
실제 원자료를 보존하고 별도의 가상 시나리오 파일에 가정값·대상·규칙을 기록합니다. 이 장의 네 가상 대상은 실제 점포와도 다릅니다. 가정 입력을 새 관측이나 실제 정책효과 추정으로 표시하지 않습니다.
Preserve actual source data and record assumptions in a separate scenario with its rules. The four hypothetical units are distinct from the actual stores. Do not relabel assumed inputs as observations or estimated policy effects.
55. 표적·규칙·실현값Target, rule and realization
μ, T(D)=표본평균, 이번 결과 4.2를 각각 어떤 층위로 읽나요?
Classify μ, T(D)=sample mean and the realized value 4.2.
풀이와 확인할 이유Solution and explanation
μ는 명시한 모형 또는 모집단에서 알고 싶은 표적, T는 자료를 숫자로 바꾸는 추정 규칙, 4.2는 이번 자료를 넣은 실현 추정값입니다. 이 표기만으로 μ가 식별되거나 표본이 iid가 되지는 않습니다.
μ is the target under a stated model or population, T the data-to-number rule and 4.2 its realized estimate. Notation alone establishes neither identification nor iid sampling.
56. 두 양의 값의 평균 부등식An inequality for two positive values
양수 a,b에서 산술평균이 기하평균 이상임을 (√a−√b)²≥0으로 보이고 로그 임금 해석과 연결하세요.
Use (√a−√b)²≥0 to compare arithmetic and geometric means of positive a,b, then relate this to log wages.
풀이와 확인할 이유Solution and explanation
전개하면 a+b−2√(ab)≥0이므로 (a+b)/2≥√(ab)입니다. 두 값이 같을 때만 등호입니다. 두 로그의 평균을 지수화하면 오른쪽이므로 일반적으로 산술 임금평균과 다릅니다.
2a+b−ab=2(a−b)2≥0
Expanding the square gives the inequality, with equality only for a=b. Exponentiating the mean of two logs gives the geometric mean, generally not the arithmetic wage mean.
2a+b−ab=2(a−b)2≥0
57. 가중치 없는 데이터 평균이라는 말The phrase “unweighted data average”
국가×연도 표에서 어떤 국가는 10년, 다른 국가는 1년입니다. 행을 균등 평균하면 국가도 같은 비중인가요?
A country-year table has ten years for one country and one for another. Does an equal-row mean give countries equal weight?
풀이와 확인할 이유Solution and explanation
아닙니다. 가용 행이 많은 나라가 더 큰 총비중을 받습니다. 목표가 국가 균등이라면 국가별 평균을 만들고 같은 국가 비중을 주는 등 시기와 결측을 포함한 규칙을 정의해야 합니다. 행 균등은 관측 구조에 따라 이미 다른 집계 가중을 유도합니다.
No. Countries with more available rows receive greater total weight. Equal-country targets require an explicit rule, potentially averaging within countries first while defining time and missingness. Equal-row weighting induces aggregate weights through record structure.
58. 가용값이 없는 집단A group with no available outcomes
두 선언 집단 중 A에는 2,4가 있고 B는 모두 결측입니다. 집단 균등 평균을 어떻게 보고하나요?
Declared group A has values 2,4 and group B has only missing outcomes. How should an equal-group mean be reported?
풀이와 확인할 이유Solution and explanation
A의 가용 평균은 3이지만 B의 평균은 미정의입니다. 따라서 두 집단 균등 평균도 이 자료만으로 정의되지 않습니다. B를 조용히 버려 3이라 하거나 0으로 넣어 1.5라 하면 표적 또는 가정을 바꾼 것입니다.
A’s available mean is three, but B’s mean is undefined, so the declared equal-group mean is undefined. Dropping B to report three or filling it with zero to report 1.5 changes the target or assumptions.
59. 미니 프로젝트의 근거 점검Audit a mini-project answer
“원행 410개 모두를 썼고 결측은 지웠다. 평균 변화가 정책효과이며 코드가 달라 독립이다”라는 답을 고치세요.
Correct: “All 410 rows were used, missing rows were deleted, mean change is the policy effect, and different codes prove independence.”
풀이와 확인할 이유Solution and explanation
원행은 410개를 보존하고 변화 계산에는 완전짝 384개를 사용했다고 적습니다. 26개 불완전행과 제외 기준을 보고합니다. 평균 변화는 관측 기술통계이며 정책효과에는 식별 근거가 필요합니다. 코드 유일성과 독립성은 다르고 code407도 두 번 나타납니다.
State that 410 original rows are retained and 384 complete pairs enter change calculations; report 26 incomplete rows and the rule. Mean change is descriptive, not automatically a policy effect. Code uniqueness differs from independence, and code407 repeats.
60. 분석 설계를 한 문단으로 쓰기Write one coherent analysis specification
실제 점포 자료로 같은 점포 후 FTE의 상수 예측을 설계하세요. 단위·선택·정보·손실·해석을 연결해 한 문단으로 쓰세요.
Specify a constant forecast of later FTE for the same stores, connecting units, selection, information, loss and interpretation.
풀이와 확인할 이유Solution and explanation
예: 원 public.dat 410행을 추적하고 각 행의 양 시점 FTE가 완전한 384쌍을 역사 실습에 사용한다. FTE 정의와 원행 키를 보존한다. 전 시점 평균을 고정하여 같은 원행의 후 FTE를 예측하고 후 정답을 사용한 MSE로 평가한다. 후 평균 oracle은 정답 사용 비교자로 따로 표시한다. 이는 선택된 완전짝의 기술적 예측 실습이며 새 점포·미래 환경 성능이나 정책 인과효과를 입증하지 않는다.
For example: trace all 410 public.dat rows and use the 384 complete FTE pairs for a historical exercise, retaining the FTE definition and original keys. Fix the before mean to predict each same row’s later FTE and evaluate later MSE. Label the after-mean oracle separately as answer-using. This is a descriptive historical prediction exercise in selected complete pairs, not validation of new-store or future-environment performance or a policy effect.
자료별 확보일·원행 식별·단위·이용 조건은 출처 기록을 확인하세요. 학습 사본은 제공처의 현재 최신 자료와 다를 수 있습니다.Consult each source record for retrieval dates, row identifiers, units and terms. Teaching copies can differ from current provider releases.