0

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?

EDennnis
  • 191
  • 1
  • 11
  • Your 2nd link doesn't require either the functional form or Matlab/Python – Hong Ooi Sep 20 '17 at 12:58
  • 2
    I don't understand. What is the issue with just taking the difference of the two means directly? – Dason Sep 20 '17 at 13:14
  • Are you sure this is a programming question? You don't outline exactly the computations you want to perform in the question itself. If this is more of a question about what statistical methods to use, then you should probably ask at [stats.se]. But I would still clarify exactly what you are doing. Where did the data come from? What inference are you trying to make exactly? – MrFlick Sep 20 '17 at 13:57

0 Answers0