Tell me more ×
Cross Validated is a question and answer site for statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.

Imagine I have a network, and in this network I have n nodes of interest.

I calculated the average shortest path between these nodes.

I want to see if they are statistically significantly close to each other.

Therefore I select n nodes from the network randomly, and work out the average shortest path length. I repeat this 1000 times, so I have

my asp for my nodes of interest a vector of 1000 asps for randomly selected nodes

How can I compare the two? Just count how many times the asp of my nodes interest < randomly selected nodes?, and divide by 1000 to get a p.value?

Or should I compare the asp of the nodes of interest with the vector of 1000 random asps using e.g. t.test or wilcoxon rank sum?

Thanks

share|improve this question

1 Answer

up vote 3 down vote accepted

I think you should make a bootstrapped confidence interval. Rank your 1000 randomly sampled asp distances. Your CI is from the 25th smallest to the 25th largest interval. If the asp for your n nodes of interest lies outside of the interval, then the asp for your n nodes is significantly different from that expected from a random selection of n nodes.

Alternatively, if you want a rough p-value, rank your asp of interest among the 1000 randomly sampled asps. If it is above the median, divide it's rank by 500. If it's below the median, subtract it's rank from 500, and divide the result by 500. The resulting number is your p-value.

share|improve this answer
Thanks a lot I will try this – Jim Bo Mar 20 '12 at 16:33
Glad to help. I just noticed that the process for finding the p-value was ambiguous. If it's below the median, subtract its rank from 500, not the value itself. – John Doucette Mar 20 '12 at 17:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.