# Conditional restrictions on agent distribution stats

**URL:** https://discourse.vfitoolkit.com/t/conditional-restrictions-on-agent-distribution-stats/294
**Category:** Uncategorized
**Created:** [July 20, 2024, 10:09pm UTC](https://discourse.vfitoolkit.com/t/conditional-restrictions-on-agent-distribution-stats/294 "2024-07-20T22:09:03Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![aledinola](https://discourse.vfitoolkit.com/letter_avatar_proxy/v4/letter/a/3ec8ea/32.png) [@aledinola](https://discourse.vfitoolkit.com/u/aledinola)
#### Post date: [July 21, 2024, 3:58pm UTC](https://discourse.vfitoolkit.com/t/conditional-restrictions-on-agent-distribution-stats/294/3 "2024-07-21T15:58:50Z")

</div>

Great, thanks! What I can do now is to compute e.g. the entrepreneurs’ share of total wealth as

```matlab
AllStats.A_entre.Mean/(AllStats.A_entre.Mean+AllStats.A_work.Mean);

```

The reason is that the command AllStats.A\_entre.Mean computes the integral of assets with respect to the population distribution, let’s call it D, and assets are recoded as 0 if the individual is not an entrepreneur. So I get the **total assets owned by entrepreneurs**.

But if I wanted the **average amount of assets conditional on being an entrepreneur** I would need to restrict the distribution only to entrepreneurs. Let’s call this new distribution as D\_E. Then the average assets of entrepreneurs are equal to the integral of assets with respect to this new distribution, D\_E.

(I’m sure you already know this of course, I just write here for other users and to my future self o/w I forget 🙂

---

_[View the full topic](https://discourse.vfitoolkit.com/t/conditional-restrictions-on-agent-distribution-stats/294)._
