Co-Variance and Signum Function

  • Thread starter Hanspi
  • Start date
  • Tags
    Function
In summary, the conversation discusses using a random variable Y generated from X by the signum function to calculate the covariance of X and Y. This can be done by computing the expected values of X and Y and using integrals to find the covariance. The conversation also mentions the difficulty of calculating p(x) in a specific system, but the individual is grateful for the starting point provided.
  • #1
Hanspi
2
0
I have a problem that turned up in my research. I'm a microelectronics engineer, s I hope this is not a textbook question for you physics specialists :-)

Given a random variable X that produces real numbers x with a distribution p(x).

The random variable Y is generated from X by the signum function; i.e., y=1 for x>=0 and y=-1 for x<0.

How can I calculate the covariance of X and Y in general? And, if there is no general solution, does a solution exist if p(x) is a gaussian distribution with mean zero?

Slainte!
Hanspeter
 
Physics news on Phys.org
  • #2
If we use E(X) to denote the expected value of X, you need to compute
E(XY) - E(X)E(Y). The expectations would be computed as integrals. For example, to compute E(XY)

[tex] E(XY) = \int_0^\infty x(1) p(x) dx + \int_{-\infty}^0 x(-1) p(x) dx [/tex]
[tex] = \int_0^\infty x p(x)dx - \int_{-\infty}^0 x p(x) dx [/tex]
 
  • #3
Thanks a lot for the reply, this is indeed what I needed. If E(X)=0, then E(Y)=0 and the Covariance is simply the mean value of the positive half of p(x) minus the mean value of the negative half of p(x).

To test my understanding, I did (MATLAB):

c=randn(1,1000000);
d=sign(c);
cov(c,d)

ans =

1.0000 0.7981
0.7981 1.0000

mean(c.*(d>=0))-mean(c.*(d<0))

ans =

0.7981


Now comes the mathematically more difficult part: to calculate p(x) in my system depending on the parameters of the system. But hat I know how to to, so thanks a lot for giving me such a good start.

Hanspeter
 

1. What is the definition of co-variance?

Co-variance refers to the measure of how two variables change together. It is a statistical concept used to determine the relationship between two variables.

2. How is co-variance calculated?

Co-variance is calculated by taking the product of the differences between each variable and their respective means, and then dividing by the total number of observations.

3. What does a positive co-variance value indicate?

A positive co-variance value indicates that the two variables are positively related, meaning that when one variable increases, the other also tends to increase.

4. How is the signum function used in co-variance?

The signum function is used in co-variance to determine the direction of the relationship between the two variables. It returns a positive value if the two variables have the same direction of change, and a negative value if they have opposite directions of change.

5. Can co-variance be used to determine causation?

No, co-variance only measures the relationship between two variables. It does not imply causation, as there may be other factors that contribute to the observed relationship.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
910
  • Set Theory, Logic, Probability, Statistics
Replies
7
Views
429
  • Set Theory, Logic, Probability, Statistics
Replies
14
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
0
Views
1K
Replies
0
Views
338
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
4K
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
807
  • Set Theory, Logic, Probability, Statistics
Replies
7
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
Back
Top