<p>The answer by @Baysiean proposed to compute a weighted average of the per-period empirical distribution functions <span class="math-container">$EDF_t(w)$</span> (where <span class="math-container">$w$</span> is the value in the support of a random variable <span class="math-container">$W$</span>), a value at which we evaluate the <span class="math-container">$EDF_t$</span> of <span class="math-container">$W$</span>. Let's see what that may mean.</p>
<p>The <span class="math-container">$EDF_t(w)$</span> expression is, for each value <span class="math-container">$w$</span> in the support,</p>
<p><span class="math-container">$$EDF_t(w) = \frac 1{N_t} \sum_iI\{w_{t,i} \leq w\}.$$</span></p>
<p>Here <span class="math-container">$w_{t,i}$</span> is a data point from the sample in the <span class="math-container">$t$</span>-th period. The proposed weighted average is</p>
<p><span class="math-container">$$\overline {EDF}(w) = \sum_t \frac{N_t}{N} EDF_t(w)  =  \sum_t \frac{N_t}{N} \frac 1{N_t} \sum_iI\{w_{t,i} \leq w\} = \frac 1 N \sum_t \sum_iI\{w_{t,i} \leq w\},$$</span></p>
<p>which is just the pooled average over all data available and across time periods.</p>
<p>In other words, taking the weighted average in this case, proves to be equivalent to consider a pooled (unweighted) average over all time period samples, something that, in order to be meaningful for <em>inference</em> (apart from being some purely <em>descriptive</em> statistic for the specific sample devoid of economic/causal/structural meaning), must rely on the assumption that the distribution functions are identical period-by-period. But &quot;taking the weighted average&quot; appears to allow for different distributions, which is not the case, if, again, one is interested in economic inference.</p>
<p>What would be really interesting is to model this estimation task as a sequential Bayesian one.</p>

CC BY-SA 4.0
2020-11-20T15:17:20.933Z
Sorry for the late reply. Thanks a lot!
Susan
CC BY-SA 4.0
2020-11-12T16:22:55.707Z
2020-11-12T16:22:55.707Z
Alecos Papadopoulos
<p>Why don't you just take a weighted average?
Suppose you have ten years <span class="math-container">$t \in \{1,...,10\}$</span> and year <span class="math-container">$t$</span> has <span class="math-container">$N_t$</span> observations such that in total you have <span class="math-container">$\sum_t N_t=N$</span> observations. Let the year-<span class="math-container">$t$</span> CDF be <span class="math-container">$F_t$</span> with support <span class="math-container">$[\underline w_t,\overline w_t]$</span>.</p>
<p>You can then define a weighted average CDF as
<span class="math-container">$$\overline F (w) = \sum_t \frac{N_t}{N} F_t(w).$$</span>
This gives you a cdf, an increasing right-continuous function ranging over [0,1] with support <span class="math-container">$\cup_t [\underline w_t,\overline w_t]$</span>. However, you have to pay attention to the individual supports, i.e., <span class="math-container">$F_t(w) =1 \forall w&gt;\overline w_t$</span> and <span class="math-container">$F_t(w) =0 \forall w&lt;\underline w_t$</span>.</p>

CC BY-SA 4.0
2020-11-09T00:10:42.070Z
@Susan If the great answer by Bayesian answered your question consider accepting it.
1muflon1
CC BY-SA 4.0
2020-11-08T17:36:17.240Z
2020-11-08T17:36:17.240Z
Bayesian
<p>I have wealth-to-income data for 10 years. I computed the cdf of this variable in each year.
Now I'm trying to average the cdfs across years. In each each, the number of observations is different.
Does anyone know how to do it?</p>
<p>Thank you in advance.</p>
<p>Susan</p>

CC BY-SA 4.0
2020-11-08T17:41:48.860Z
You can represent the empirical cdf over all pooled data (pooled over the years). It would be nice to test whether the cdf of a specific year is the same as the pooled cdf.
Bertrand
<statistics><probability><stata>
How to average CDFs of one variable across years
Susan
# How to average CDFs of one variable across years

(Asked by: username_0 on 2020-11-08)

I have wealth-to-income data for 10 years. I computed the cdf of this variable in each year.
Now I'm trying to average the cdfs across years. In each each, the number of observations is different.
Does anyone know how to do it?

Thank you in advance.

username_0

**Tags:** statistics, probability, stata

> **Comments:**
> **username_1**: You can represent the empirical cdf over all pooled data (pooled over the years). It would be nice to test whether the cdf of a specific year is the same as the pooled cdf.  

---

## 2 answers

### Answer by username_3 on 2020-11-08. Score: 5

Why don't you just take a weighted average?
Suppose you have ten years $t \in \{1,...,10\}$ and year $t$ has $N\_t$ observations such that in total you have $\sum\_t N\_t=N$ observations. Let the year-$t$ CDF be $F\_t$ with support $[\underline w\_t,\overline w\_t]$.

You can then define a weighted average CDF as
$$\overline F (w) = \sum\_t \frac{N\_t}{N} F\_t(w).$$
This gives you a cdf, an increasing right-continuous function ranging over [0,1] with support $\cup\_t [\underline w\_t,\overline w\_t]$. However, you have to pay attention to the individual supports, i.e., $F\_t(w) =1 \forall w>\overline w\_t$ and $F\_t(w) =0 \forall w<\underline w\_t$.

> **Comments:**
> **username_4**: @username_0 If the great answer by username_3 answered your question consider accepting it.  

---

### Answer by username_2 on 2020-11-12. Score: 4

The answer by @Baysiean proposed to compute a weighted average of the per-period empirical distribution functions $EDF\_t(w)$ (where $w$ is the value in the support of a random variable $W$), a value at which we evaluate the $EDF\_t$ of $W$. Let's see what that may mean.

The $EDF\_t(w)$ expression is, for each value $w$ in the support,

$$EDF\_t(w) = \frac 1{N\_t} \sum\_iI\{w\_{t,i} \leq w\}.$$

Here $w\_{t,i}$ is a data point from the sample in the $t$-th period. The proposed weighted average is

$$\overline {EDF}(w) = \sum\_t \frac{N\_t}{N} EDF\_t(w) = \sum\_t \frac{N\_t}{N} \frac 1{N\_t} \sum\_iI\{w\_{t,i} \leq w\} = \frac 1 N \sum\_t \sum\_iI\{w\_{t,i} \leq w\},$$

which is just the pooled average over all data available and across time periods.

In other words, taking the weighted average in this case, proves to be equivalent to consider a pooled (unweighted) average over all time period samples, something that, in order to be meaningful for *inference* (apart from being some purely *descriptive* statistic for the specific sample devoid of economic/causal/structural meaning), must rely on the assumption that the distribution functions are identical period-by-period. But "taking the weighted average" appears to allow for different distributions, which is not the case, if, again, one is interested in economic inference.

What would be really interesting is to model this estimation task as a sequential username_3 one.

> **Comments:**
> **username_0**: Sorry for the late reply. Thanks a lot!  

---

