Trying to intuitively understand "expected value" and "mean" of a variable K when K ranges from 0 to N Given K ranges sequentially from 0 to N, how is the "expected" value of K simply the average of all possible values that it could take (in other words, N/2)?
In this case, does "expected" simply mean "most likely"? Because I am a bit confused as to how the value that K could most likely take is equal to the average of all its possible values
 A: In short, the answer depends on how the random variable "K" takes values (we call this the distribution of K).
If "K" take a random value on the range 0 to N, then think about the mean, or expectation like this.
Suppose you sample this value of K 1,000,000 times. What will the average number be?
In this case, E(K) = (N+0)/2 = N/2
Remember this only applies when K is uniformly distributed across values from 0 to N. (For any uniformly distributed random variable, E(X)=(a+b)/2, where X is in [a,b])
A: "Expected" does not mean "most likely." In common parlance, we would refer to the expected value as an average (although "average" is also used sometimes to describe other notions of centers, such as the median or mode).
If $K$ is understood as a random variable that is uniformly distributed across the integers from $0$ to $N$ inclusive, i.e. taking on the value of any one of these integers with probability $1\over N+1$, then its expected value is indeed $N/2$:
$$E[K]=\sum_{k=0}^{N}kP(K=k)=\sum_{k=0}^{N}{k \over N+1}={N \over 2}.$$
Of course, without an explicit notion of probability here, $N/2$ can also just be simply understood as the equal-weighted arithmetic average of the integers from $0$ to $N$ inclusive.
