I have a given set of data [2, 4, 5, 7, 10] and the expected value or the mean of E(x) = 6. How would I get the probabilities of each value in this set based on this formula E(x) = 2 * P(2) + 4 * P(4) + 5 * P(5) + 7 * P(7) + 10 * P(10) or E(X) = Xi * P(Xi), P(Xi) is the probability for a given X
The thing is I need a formula to generate this models dynamically, meaning the values in the set are always changing and I can't use a static model
Zachary Long
So your problem is in fact:
Let [math]x_1,…,x_5\in\mathbb{N}[/math]. Find a random variable [math]X[/math] such that [math]\mathbb{E}(X)=6[/math]
?
Even in this form it doesn't really make sense since the integers could all be 1 and it would be impossible. Are all integers distinct? Can you guarantee that [math]\min_i x_i \le 6 \max_i x_i[/math] ?
Juan Gray
It should be [math]\min_i x_i \le 6 \le \max_i x_i[/math] ?
Dylan Martinez
min x < mean < max x, not all x are distinct. There may be a couple with the same value
Easton Walker
but yes there will always be values smaller and greater than the mean
Cooper Harris
also P(xi) > 0
Jason Flores
Then essentially you have to do what I did in my first post. From the five numbers, take one that is less or equal to 6, one that is greater or equal to 6. Let a and b be these numbers. Solve linear problem:
[math]ax+by=6[/math] [math]x+y=1[/math]
If you didn't drop out of linear algebra you'll have the solutions x=P(X=a) and y=P(X=b). It'll be a discrete distribution on the set of numbers if you put P(X=anything else then a or b)=0.
Now if you want a "nicer" distribution that is > 0 for all numbers, you won't be able to do it in general.
Caleb Lewis
Is there really no way, I absolutely need to have probability for each value to be > 0. Is there really no way?
Ayden Hill
You have a set of data? If so, you can find (with R) how often each number relatively occurs.
Henry Phillips
How would that help me? The values are generally unique, but thats not a must
Christian Gray
You don't have a unique solution here. You can come up with any reasonable values for the first 5 possible events, then use the expected value equation to calculate the sixth.
Justin Barnes
Choosing the probabilities of all but one event automatically chooses the probability of the one left out since the sum of the probabilities has to sum to 1. So doing this will never give you a distribution.
There is no guarantee of even one solution the the linear problem since you have the constrain that all probabilities must be positive and less or equal to 1.
Jack Bell
Sorry what I meant to say is that doing this will never give you an expected value of 6. But it will be a distribution.
Grayson Watson
I realize thats the case when dealing with free parameters, tho Im still interested if there is a way to find the optimized function that produces optimized probabilities
Aaron Martin
Would there be a way to do this by approximating the probabilities to the absolute value of variables
Blake Wood
You can reformulate it as an optimization problem like: