From: dc353 on 19 Mar 2010 12:38 Hi; could someone suggest how to calculate a random variable with 0 correlation to a series of know observations? I have a dataset that consists of stock price returns for one stock on a dly basis. Total number of observations is 200. I need to create a random variable with 200 observations that has a correlation of .2 with this dataset
From: Paige Miller on 19 Mar 2010 12:57 On Mar 19, 12:38 pm, "dc...(a)hotmail.com" <dc...(a)hotmail.com> wrote: > Hi; > > could someone suggest how to calculate a random variable with 0 > correlation to a series of know observations? > > I have a dataset that consists of stock price returns for one stock on > a dly basis. Total number of observations is 200. I need to create a > random variable with 200 observations that has a correlation of .2 > with this dataset You ask for a random variable that has zero correlation with another RV? That's easy, just use any random number generator, your new variable is uncorrelated with the old. You ask for a random variable that has 0.2 correlation with another RV? The method is here: http://www.uvm.edu/~dhowell/StatPages/More_Stuff/Gener_Correl_Numbers.html -- Paige Miller paige\dot\miller \at\ kodak\dot\com
From: dc353 on 19 Mar 2010 14:05 On Mar 19, 12:57 pm, Paige Miller <paige.mil...(a)kodak.com> wrote: > On Mar 19, 12:38 pm, "dc...(a)hotmail.com" <dc...(a)hotmail.com> wrote: > > > Hi; > > > could someone suggest how to calculate a random variable with 0 > > correlation to a series of know observations? > > > I have a dataset that consists of stock price returns for one stock on > > a dly basis. Total number of observations is 200. I need to create a > > random variable with 200 observations that has a correlation of .2 > > with this dataset > > You ask for a random variable that has zero correlation with another > RV? That's easy, just use any random number generator, your new > variable is uncorrelated with the old. > > You ask for a random variable that has 0.2 correlation with another > RV? The method is here:http://www.uvm.edu/~dhowell/StatPages/More_Stuff/Gener_Correl_Numbers... > > -- > Paige Miller > paige\dot\miller \at\ kodak\dot\com Paige, the population correlation may be 0 but the sample correlation isn't. I'm looking to create a second random variable with sample correlation of 0, once that's done getting the sample correlation to equal .2 is relatively straightforward. If you use the rand() function in excel and create two random variables you quickly see what I'm talking about. Thanks.
From: xlr82sas on 19 Mar 2010 14:27 On Mar 19, 11:05 am, "dc...(a)hotmail.com" <dc...(a)hotmail.com> wrote: > On Mar 19, 12:57 pm, Paige Miller <paige.mil...(a)kodak.com> wrote: > > > > > > > On Mar 19, 12:38 pm, "dc...(a)hotmail.com" <dc...(a)hotmail.com> wrote: > > > > Hi; > > > > could someone suggest how to calculate a random variable with 0 > > > correlation to a series of know observations? > > > > I have a dataset that consists of stock price returns for one stock on > > > a dly basis. Total number of observations is 200. I need to create a > > > random variable with 200 observations that has a correlation of .2 > > > with this dataset > > > You ask for a random variable that has zero correlation with another > > RV? That's easy, just use any random number generator, your new > > variable is uncorrelated with the old. > > > You ask for a random variable that has 0.2 correlation with another > > RV? The method is here:http://www.uvm.edu/~dhowell/StatPages/More_Stuff/Gener_Correl_Numbers... > > > -- > > Paige Miller > > paige\dot\miller \at\ kodak\dot\com > > Paige, > > the population correlation may be 0 but the sample correlation isn't. > I'm looking to create a second random variable with sample correlation > of 0, once that's done getting the sample correlation to equal .2 is > relatively straightforward. If you use the rand() function in excel > and create two random variables you quickly see what I'm talking > about. Thanks.- Hide quoted text - > > - Show quoted text - I am getting a little over my head, although theoretically random x and y are uncorrelated/independent and I expect the corr-->0 as sample size increases, the sample correlation is unlikely to be 0. I think you can create a second variable with correlation zero by making it a special othogonal vector to the first? I think the dot product has to be zero and something else (sum of components=1? x+y=1 I am not sure) Here is an example of two vectors with zero correlation data z; x=1; y=0; output; x=0; y=1; output; x=0; y=0; output; x=1; y=1; output; run; proc print; run; Obs X Y 1 1 0 2 0 1 3 0 0 4 1 1 proc corr data=z; var x; with y; run; Pearson Correlation Coefficients, N = 4 Prob > |r| under H0: Rho=0 X Y 0.00000 1.0000
From: Paige Miller on 22 Mar 2010 09:16 On Mar 19, 2:05 pm, "dc...(a)hotmail.com" <dc...(a)hotmail.com> wrote: > the population correlation may be 0 but the sample correlation isn't. > I'm looking to create a second random variable with sample correlation > of 0, once that's done getting the sample correlation to equal .2 is > relatively straightforward. Okay, so now you go from talking about random variables to samples. Different animal. You simply need to take your first vector of observations, and create a vector orthogonal to it. Simple geometry. > If you use the rand() function in excel > and create two random variables you quickly see what I'm talking > about. Since I never use the rand() function in Excel (and in fact, never use Excel for anything statistical), I do not "quickly see what you are talking about". Perhaps you could explain what you are talking about here without referring to Excel. -- Paige Miller paige\dot\miller \at\ kodak\dot\com
|
Next
|
Last
Pages: 1 2 Prev: Siebel Business Analyst with Pharma -- Milpitas CA Next: generate SAMPLE correlations |