# Description of problem

While developing a network, I came to connect two neuron groups of 240 neurons each, with a low probability (p=0.01) but a large number of synapses (n=100). I am not sure about how both these characteristics work together. Will it first run the probability and connect each pair with a probability of 1% (in my case 1 neuron would project to 2.4 neurons on average) and then create 100 synapses on the connected neurons? Or is there a computation mixing probability and number of synapses, i.e. some of the 100 synapses are connected to different neurons?

Thanks
Guilhem

Hi Guilhem. The â€śnumber of synapses `n`â€ť is the number of synapses for a single connection. That means if you use `synapses.connect(p=0.01, n=100)`, for each pair of neurons that is connected there will be 100 synapses.

In the documentation we have some Pseudocode showing how the arguments are interpreted (in the general case, `p` and `n` can be functions, ignore the `(i, j)` part if they are just constants):

If conditions for connecting neurons are combined with both the n (number of synapses to create) and the p (probability of a synapse) keywords, they are interpreted in the following way:

``````    For every pair i, j:
if condition(i, j) is fulfilled:
Evaluate p(i, j)
If uniform random number between 0 and 1 < p(i, j):
Create n(i, j) synapses for (i, j)
``````

Thank Martin

Sorry, I didnâ€™t see this part of the documentation.

No worries, it is a bit hidden in the â€śtechnical detailsâ€ť section. If everything is clear now, please mark the question as solved by clicking on the three dots below my answer and then clicking on â€śSolutionâ€ť.

PS: My nameâ€™s Marcel, not Martin