Probability of generating higher number

  • Thread starter Thread starter Vrbic
  • Start date Start date
  • Tags Tags
    Probability
Vrbic
Messages
400
Reaction score
18
Hello, I have a query:
If I have two normal distribution with different mean value and variability. I am generating numbers by them. How can I compute probability, that one of them (with higher mean value for example) going to generate next number higher than the latter?
Thank you for reply ;)
 
Physics news on Phys.org
Construct a new stochastic variable based on the two you have that easily let's you describe whether or not a particular variable is larger than the other (can you think of one?). Then compute the probability of this happening based on the distribution of the new stochastic variable.
 
Orodruin said:
Construct a new stochastic variable based on the two you have that easily let's you describe whether or not a particular variable is larger than the other (can you think of one?). Then compute the probability of this happening based on the distribution of the new stochastic variable.

It seems very easy but you are probably in mathematic far than me :) Intuitively I suspect where should I get, but practically I have a problem how define my new variable. Could you suggest some few steps?
 
Vrbic said:
It seems very easy but you are probably in mathematic far than me :) Intuitively I suspect where should I get, but practically I have a problem how define my new variable. Could you suggest some few steps?
And thanks for help ;)
 
How would you judge if a number is larger than another?
 
Orodruin said:
How would you judge if a number is larger than another?
Ou heck :) Difference is negative :)
 
Yes, or positive, depending on which difference you take. So how do you check the probability of the difference being negative?
 
Orodruin said:
Yes, or positive, depending on which difference you take. So how do you check the probability of the difference being negative?
If it is less than zero it is negative. Now I don't understand where you are pointing.
 
Can you find the probability distribution of the difference?
 
  • #10
mfb said:
Can you find the probability distribution of the difference?
I don't know. I have two normal distribution function with different mean value and variability. I know exact formulas these functions but I can't prepare a new one which will describe a distribution of new variable which is difference of tow randomly generated numbers by these normal distribution functions. I need bigger hint please :)
 
  • #11
If you have a normally distributed variable ##X## with mean ##\mu## and variance ##V##, what is the distribution of ##-X##?

If you have two normally distributed variables ##X## and ##Y##, what is the distribution of the sum ##X+Y##?
 
  • #12
Orodruin said:
If you have a normally distributed variable ##X## with mean ##\mu## and variance ##V##, what is the distribution of ##-X##?
a) I am not sure but I guess that the mean ##\mu## -> ##- \mu##. Variance is same.
Orodruin said:
If you have two normally distributed variables ##X## and ##Y##, what is the distribution of the sum ##X+Y##?
b) Again guess but distribution of the sum ##X+Y## should be normal distribution with mean ##\mu_X + \mu_Y## but I am not sure what about variance...
 
  • #13
Vrbic said:
b) Again guess but distribution of the sum ##X+Y## should be normal distribution with mean ##\mu_X + \mu_Y## but I am not sure what about variance...

What is the variance of any sum of two stochastic variables? You can derive this from the definition of the variance.
 
  • #14
Orodruin said:
What is the variance of any sum of two stochastic variables? You can derive this from the definition of the variance.
Hm def. should be: ## \sigma^2=\int^{\infty}_{-\infty}x^2f(x)dx-[\mu(x)]^2## it seems nice but if I don't know ##\sigma^2 ## I don't know f(x). So I am quite confused. Honestly, I guess variance will always grow. So probably ##V(x-y)=V(x)+V(y)##. But I would like to know how to derive that.
 
  • #15
You can express the variance of one variable in terms of two expectation values (a simplified version of your formula). That allows to modify them without integrals.
 
  • #16
Vrbic said:
Hm def. should be: ## \sigma^2=\int^{\infty}_{-\infty}x^2f(x)dx-[\mu(x)]^2## it seems nice but if I don't know ##\sigma^2 ## I don't know f(x).

Well, this is not quite true. What is true is that a normal distribution takes two parameters and that one of them can be taken to be the variance. With the appropriate f(x) you will then recover ##\sigma^2 = \sigma^2##, but this is not what we are after now. We are after a general statement about variances and you need to go back to the very definition (you can do it completely without integrals just using the properties of expectation values).
 
  • #17
Orodruin said:
Well, this is not quite true. What is true is that a normal distribution takes two parameters and that one of them can be taken to be the variance. With the appropriate f(x) you will then recover ##\sigma^2 = \sigma^2##, but this is not what we are after now. We are after a general statement about variances and you need to go back to the very definition (you can do it completely without integrals just using the properties of expectation values).
So do you mean "discreet definition" in this way: ## \sigma^2=\sum [x_i-\mu(x)]^2p_i##?
 
  • #18
Vrbic said:
So do you mean "discreet definition" in this way: ## \sigma^2=\sum [x_i-\mu(x)]^2p_i##?

No. I mean the more abstract definition V(X) = E((X-E(X))^2).
 
  • #19
Orodruin said:
No. I mean the more abstract definition V(X) = E((X-E(X))^2).
Ah I see... sorry.
So now I should substitute X->X-Y. Ok? And wirte ## V(X-Y) = E[(X-Y-E(X-Y))^2]=E[(X-Y-E(X)-E(Y))^2]=...=##
##=E[(X-E(X))^2] + E[(Y-E(Y))^2] + E[-2XE(Y)-2YE(X)]=V(X)+V(Y)+ E[-2XE(Y)-2YE(X)]## if I can split mean ##E(X-Y)=E(X) - E(Y)##. Am I right? But what about extra term ## E[-2XE(Y)-2YE(X)]## ??
 
  • #20
E(X) is just a constant and can be moved out of the expectation value due to linearity.
 
  • #21
Orodruin said:
E(X) is just a constant and can be moved out of the expectation value due to linearity.
So, what I have written is right? And my origin problem. Now I have a distribution function some new variable ##Z=X-Y## where ##E(Z)=E(X)-E(Y)## and ##V(Z)=V(X)+V(Y)##. So the probability of higher variable X is integration normal distribution for Z from 0 to infinity?
Am I right? Now it looks quite easy :)
 
  • #22
It does not have to be harder ;)
 
  • Like
Likes Vrbic
  • #23
Orodruin said:
It does not have to be harder ;)
Thank you very much, you are good teacher ;)
 

Similar threads

Back
Top