I report the text of ex.2 of homework 2 for practicality:
---
Implement the empirical cumulative distribution function F_X(x)=
cdf(dist, x)
taking as inputs a pyro.distributions
object dist
, corresponding to the distribution of X, and integer value x
.
Suppose that X∼N(0,1)
and plot F_X(x).(sorry for the messy format)
---
Now here are my doubts:
1. Shouldn't the ecdf be derived from a sample of a distribution? Why would we feed the distribution object to the function instead of a vector samples from said `dist` object?
2. If the `x` input parameter was intended to be the input of the F_X(x) function, why would it be an integer? Shouldn't it be possible to chose it in the generic distribution support, therefore more likely a real number? This is especially true in the case asked for in the second point!
Thanks in advance,
Michele