R: Difference in expected values of empirical distributions - functional forms unknown

71 views Asked by At

Given a generated two empirical distributions

I am trying to find the expected value of each distribution and then take the difference between these two expected values.

Most questions that I have found include either knowing the functional form or are in Matlab/Python. For example,

How can I efficiently calculate the binomial cumulative distribution function? https://stats.stackexchange.com/questions/105509/integrating-an-empirical-cdf

Empirical Distribution Function in Numpy

Assume that this data is generated from an unknown empirical distribution:

df <- data.frame(x1=rnorm(1000), x2=rnorm(1000,2,1))

Other than randomly sampling and taking the mean of each iteration (i.e. central limit theorem), how would I find the expected value of each distribution?

0

There are 0 answers