G ∈ ER(250, 0.5)
My teacher said the formula for the expected number of edges in a graph, is: N over 2 * the probability of p.
So for example, in a random graph, I have 250 vertices and a probability of 0.5. His formula would give me 250 over 2 times 0.5.
But, in the link beneath, you see something different:
Find the expected number of edges in the graph.
Beside that, my teacher evenually calculated it like this: 250 * 249 / 2, yet I don't know which one is correct now. It is confusing.
Can someone help me?
When you say "$N$ over 2", presumably what is meant is the binomial coefficient "$N$ choose 2", often written $\binom{N}{2}$. This is equal to $\frac{N(N-1)}{2}$, and gives the total number of pairs of vertices—i.e. the number of potential edges.
Multiplying this by the probability of choosing each edge (0.5 in your case) gives the expected number of edges.