Thread Subject: random Bernoulli simulation with defined probability

Subject: random Bernoulli simulation with defined probability

From: Michael Ashby

Date: 25 Jul, 2009 17:05:04

Message: 1 of 1

I have a dataset that defines the chance that any two nodes are connected by an edge (graph theory terminology). So, the mean connectivity for a given node can range from 0 (no connections) to 1 (connected to everyone) and across all the nodes (say, 50) forms a distribution that is non-binomial:

p = [0.285 0.214 0.285 0.071 0 0 0 0.142 0 0 0]
 
I'd like to model the network of connections and have been attempting to do this by randomly generating 0 or 1 for each potential connection in the network (I will then analyze in multiple iterations to understand the type of network that is formed).

So far, I have been able to randomly generate these zeros and ones from a binomial distribution around the mean connectivity of population (e.g. using binornd). Now I'd like to do this using the realistic probability distribution above.

I have been playing around with inversion methods and with Jos' randp (FEX: http://www.mathworks.com/matlabcentral/fileexchange/8891) but can not figure out the correct implementation to get the zeros and ones. Can anyone help me out this?

Many thanks,

Mike

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
bernoulli Michael Ashby 25 Jul, 2009 13:09:07
random number g... Michael Ashby 25 Jul, 2009 13:09:06
rssFeed for this Thread

Contact us at files@mathworks.com