BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
scarico
Calcite | Level 5

Hello!

I have two different time series of average values of a high and low portfolio

For Example:

Low Portfolio : 0.1  0.5   0.4  0.6  0.1  0.5  0.6 ....  (Average: 0,4)

High Portfolio: 1.1  0.4   1.4  0.6  0.2  0.2  0.8 ....  (Average:0,67)

I want to test, whether the difference (0,67-0,4) between the two time series ist statistical significant.

Thanks a lot!

1 ACCEPTED SOLUTION

Accepted Solutions
Murray_Court
Quartz | Level 8

It looks like Analysis of Variance is your solution here.

The assumptions made about your data must be as follows:

- Observations are independent (has you data been collected properly)

- Errors are normally distributed

- Both groups have equal response variences

  You have given a very small sample; the following program tells me through a homogeneity of variences test that the differences in variences between the groups are within standard statistical parameters (only just).

data temp;

input low high;

datalines;

  1. 0.1  1.1
  2. 0.5  0.4
  3. 0.4  1.4
  4. 0.6  0.6
  5. 0.1  0.2
  6. 0.5  0.2
  7. 0.6  0.8

;

data temp_1;

team=1;

set temp (keep=low rename=(low=score));

run;

data temp_2;

team=2;

set temp(keep=high rename=(high=score));

run;

data temp;

set temp_1 temp_2;

run;

proc glm data=temp;

class team;

model score=team;

means team / hovtest;

quit;

With such a small sample size it is very hard to say wether the errors are normally distributed.

Having done our best to verify the assumptions (if you have more data you will be able to do this properly, just run a histrogram of the differenced between the mean and the observations for each group and verify that it looks like a bell curve), we can now proceed with an analysis of varience test, which is also included in the output of the GLM procedure of the abocve program.

The differences in varience yeild an F-statistic (strength and consistency of difference between means) of 2.02. The chances of this happening randomly on the assumption that there was no difference between the groups is given to be around 18.1%, this is above the common statistical threshold of 5%, implying that we cannot conclude that the two groups are different based on our observations.

Adding more observations to our data help us to determine with greater accuracy what is really the case here, as generally speaking when sample sizes are below 30 most statistical tests will be inconclusive.

Hope this helps,

-Murray

View solution in original post

3 REPLIES 3
scarico
Calcite | Level 5

OK, I think it is:

proc ttest data=zyx;                                                                                                                  

class xyz;                                                                                                                          

var x;                                                                                                                             

run;      

But please correct me, if it is wrong

Murray_Court
Quartz | Level 8

It looks like Analysis of Variance is your solution here.

The assumptions made about your data must be as follows:

- Observations are independent (has you data been collected properly)

- Errors are normally distributed

- Both groups have equal response variences

  You have given a very small sample; the following program tells me through a homogeneity of variences test that the differences in variences between the groups are within standard statistical parameters (only just).

data temp;

input low high;

datalines;

  1. 0.1  1.1
  2. 0.5  0.4
  3. 0.4  1.4
  4. 0.6  0.6
  5. 0.1  0.2
  6. 0.5  0.2
  7. 0.6  0.8

;

data temp_1;

team=1;

set temp (keep=low rename=(low=score));

run;

data temp_2;

team=2;

set temp(keep=high rename=(high=score));

run;

data temp;

set temp_1 temp_2;

run;

proc glm data=temp;

class team;

model score=team;

means team / hovtest;

quit;

With such a small sample size it is very hard to say wether the errors are normally distributed.

Having done our best to verify the assumptions (if you have more data you will be able to do this properly, just run a histrogram of the differenced between the mean and the observations for each group and verify that it looks like a bell curve), we can now proceed with an analysis of varience test, which is also included in the output of the GLM procedure of the abocve program.

The differences in varience yeild an F-statistic (strength and consistency of difference between means) of 2.02. The chances of this happening randomly on the assumption that there was no difference between the groups is given to be around 18.1%, this is above the common statistical threshold of 5%, implying that we cannot conclude that the two groups are different based on our observations.

Adding more observations to our data help us to determine with greater accuracy what is really the case here, as generally speaking when sample sizes are below 30 most statistical tests will be inconclusive.

Hope this helps,

-Murray

SteveDenham
Jade | Level 19

I would really look at some of the procedures in SAS/ETS, or at some mixed modeling techniques that address autocorrelation, for timeseries comparisons.  The usual methods (TTEST, GLM) offered for analysis fail horribly on the assumption of independence of the observations.  I would recommend PROC MIXED with the REPEATED statement, or PROC PANEL in SAS/ETS.

Steve Denham

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 8330 views
  • 0 likes
  • 3 in conversation