Why do we get the same result using different ensembles? There are different kinds of ensembles: microcanonical, canonical, grand-canonical... But for a particular system, no matter whether the system is isolated or closed, they just give the same result of $E$ and $N$.
For example, to calculate energy for gas in a box, the number of particles $N$ is fixed. However, if we use grand-canonical ensemble, just replace $\bar{N}$ with $N$ in the final result, we get the correct answer, which is the same as the result using canonical ensemble.
For example, to calculate Maxwell-Boltzmann distribution, use canonical ensemble and grand-canonical ensemble will give the same result.
I'm confused with it. Since the physical condition is different, why these ensembles give just the same answer?
 A: Here's a close analogy which (besides having has its own practical use) can shed some light, if you're looking at the problem from the probabilistic-mathematical point of view.
Imagine we play the following game ($A$) : we throw $N$ balls into $K$ boxes, with uniform probability. Let call the result (or configuration) $X=(x_1,x_2 ...x_k)$, where $x_i$ is the number of balls inside box $i$). 
It's clear that the probability of each configuration is given by a multinomial distribution.
It's also clear that $E(x_i)=N/K$.
We'll then be interested in computing some function of each result (configuration), averaged over several trials. Typically some $E(g(X))$ or some probabilty asociated with $X$ (eg: which is the variance of each $x_i$? which is the probability that the first half of the boxes have more than $N/2+\delta$ balls? etc) This is feasible, but no very easy, because it's a little cumbersome to integrate (sum) over a multinomial distribution.
Now, imagine a different game ($B$) : we throw inside each box a random number of balls, independently, following a Poisson distribution, with mean $\lambda = N/K$
In this case, the configurations  $Y=(y_1,y_2 ...y_k)$ will follow a joint Poisson distribution. This is clearly not the same as the above; for one thing, now we have that the total number of balls $n_y=\sum y_i$ is a random variable, while in game $A$ it was fixed ($n_x = \sum x_i=N$). However, they resemble at least in the average : $E(n_y)=E(n_x)$ and the same is true for the marginals $E(x_i)=E(y_i)$. But we can say much more: we can check that our Poisson conditioned to the sum being equal $N$, ie $P(Y|n_Y =  N_y)$, is the same 
multinomial as above (that's why we chose a Poisson).
Then, game $B$ is not equivalent to $A$... but it is when given the event $n_y =  N$. And, by continuity, we expect them to be "almost equivalent" when the ideal event "almost" happens" ($n_y \approx  N$).  Furthermore, $E(n_y)=N$, and, if $N$ is large, by the law of large numbers, we expect $n_y \to  N$; i.e., with high probability we'll be at or near the conditioning event. Hence, the conditioning will eventually turn irrelevant (informally: we'll be conditioning over an almost-sure event region), and the games will be asympotically statistically equivalent. 
Now, consider that game $B$, though it appears more complex than the original $A$ (the total number of balls is variable instead of fixed), it's actually much more mathematically tractable, because the variables $y_i$ are independent. Then, instead of computing our $E(g(X))$ we compute $E(g(Y))$, and we are justified in assume that as $N\to \infty$ the results will be the same.
Notice also that game $A$ has two fixed paramenters: $N,K$. In game $B$, instead $N$ is not fixed, only its average; but, on the other side, we now have a new fixed parameter $\lambda$. This is totally analogous to what happens when transforming between ensembles.
And it is (IMO) also totally analogous in spirit: instead of the original "natural" physic model (fixed number of particles, or kinetic energy), we devise an alternative model where the old parameter is not fixed but variable, and we add a new "artificial" fixed parameter (fugacity, temperature) that guarantees that asymptotically the models are equivalent. Surely, we can give physical justifications for the alternative models (reservoirs), but the main reason to prefer them is that, in spite of looking more complicated, actually they are mathematically simpler.
