How is it possible for the population mean to be known Suppose that I have a class of 35 students whose average grade is 90. I randomly picked 5 students whose average came out to be 85. Assume their grades are i.i.d and of normal $N(\mu, \sigma^2)$. From the example I have seen, $\mu$ is usually called the population mean and should be equal to $90$. The sample me is usually referred to as $\frac{\sum{X_i}}{5}$. When we do hypothesis testing we can ask whether the sample mean is equal to $90$.

*

*Is the sample mean $\frac{\sum X_i}{5}$ or $85$?


*The population mean mathematically should be $\mu$, but I think people also say that $90$ is the population mean. This does not make sense to mean since it is not obvious to me that why $90 = \mu$. $90$ is calculated through the sum of the grades divided by 35, whereas $\mu$ is equal to some integral. I just do not see how they can be equal to each other.
 A: You have a valid point here. In fact, the population has 35 members, so its distribution must be discrete, while a normal distribution is continuous. The sentence starting "Assume ...." is telling you that we are going to approximate that discrete distribution with a continuous, normal one.
Your other (implicit) point, "Look, there are just 35 values, and apparently we already know their average (though we're not told how we know that!). Surely we know all the scores, then. So why isn't the whole class our sample?" also has a point. This one is mostly explained by the fact that this is an artificial problem, set up so that you can solve it with your current tool set, which I'm betting you're just starting to build.
A real problem might have a much larger population, or individual data points might be a lot harder or more expensive to gather than just asking a student their test score. As for somehow magically knowing the population mean, that's also unlikely in reality.
To answer your two numbered questions:

*

*Yes, the sample mean is $\Sigma_{i=1}^5 x_i /5$, which you are told equals 85.


*You are told to model/approximate the (discrete) distribution of the 35 grades with the a (continuous) $N(\mu, \sigma)$ distribution. Honestly, you've confused me a bit here. In hypothesis testing, the population/model mean is usually unknown, and its exact value is never determined. Maybe if you're just learning how to do the calculations required for hypothesis testing, you might be provided with a value of $\mu$ to use, but in general you won't be setting $\mu$ to any value. I can't really see of what use the class's average score is. And without seeing an actual question, I'm having trouble coming up with a reason why it would have been provided to you. Maybe you've combined some parts of two or more different questions?

Some other observations: The class of 35 students is kind of immaterial here. All we care about is that we are going to model each student's score as if it's drawn from i.i.d. normal distributions. This might be a nationally administered test, with millions of scores, and it wouldn't make much of a difference.
The other point is that you say we can use a hypothesis test to ask whether the sample mean is 90. That's not right. We know the sample mean, and we know it's not equal to 90. A hypothesis test makes an assertion about the unknown population mean (which is the $\mu$ we have in our model), and we use our observed (known) sample mean to make  statements about how probable (or improbable) that assertion is.
A: You are assuming that the grade of each student follows a normal distribution $\mathsf{Norm}(\mu, \sigma^2)$ and you assume $\mu = 90.$ You may rise the question as to whether is sensical to model grades with normal distribution since grades usually come either as points (e.g. 90 out of 100) or as fractions (e.g. 8.7 out of 10). Either way, the normal distribution may not seem a good choice. However, in many circumstances the normal distribution will provide a fit good enough to make inferences and generalisation over the average or other aggregate measure of the population. Of course, there are other tools to assess how well is the assumption of normality on a given data set, such as QQ plots, histograms and statistical goodness of fit tests.
Under the assumptions, each student is then "modelled" as a random variable $X_i \sim \mathsf{Norm}(90; \sigma^2).$ If you pick 5 at random, then $(X_1 + \ldots + X_5)/5 \sim \mathsf{Norm}(90; \sigma^2 / 5).$ Note that $90$ is assumed to be the "population mean" which is just the statistician being pedantic in expressing that this is the number assumed to be the mean of the distribution we are using to model the current scenario (the term "population" is just fanciful and mean nothing, although some statistical books do take the term quite literally and go into a rabbit hole of phylosphising). In contrast, if you have a sample (i.e. observation that came at random) then the "sample mean" is just the (usual) average of the observed numbers. In your problem, it is assumed that this observed average is 85. Now the sensical question would be: Is 85 consistent with the proposed model? And the statistical way to answer this question would go on to study how likely it is for a random variable $\mathsf{Norm}(90; \sigma^2/5)$ to be less than or equal to 85, i.e. we calculate $\mathbf{P}(X < 85)$ using standarisation and tables. (Of course, you also need to assume the value of $\sigma.$) Anyway, if this probability is too small, you have a degree of certainty that this model is not sensical with the observed data; but if the probability is not so small (e.g. it would occur onve every 5, 10 or 20 times), then maybe the model is sufficiently good. In fact, a nice point rosen a while ago is not to only consider those numbers that would surprise us on the same side of 85, but rather all number that would surprise us (i.e. cause suspicion). In this case, those are numbers that are far from the average. Since you observed a distance of 5 from the average, you would be wondering "What is the probability that, assuming the current proposed model, the observation  differ from the mean in at least 5?" Mathematically, you would calculate $\mathbf{P}(|X-90|>5).$ The same idea as before, too small numbers raise a lot of suspicion: the model may be inadequate.
Final note: there is no way you can find the "true" mean and no model or method can eliminate all uncertainty. You alway have to assume a degree of error (i.e. you have to always assume that any choice you make may be erroneous, ideally under very rare circumstances).
A: We do hypothesis testing when the sample size excedes the number of our observations. That is the meaning of $n\rightarrow \infty$ in, e.g. $\sqrt{n}(\bar{X}_n - \mu)\rightarrow_d N(0,\sigma^2)$ where $\bar{X}_n=\dfrac{1}{n}\sum x_i$ (the Linderberg-Levy CLT). Notice that the value of $\bar{X}_n$ depends on $n$, i.e. the sample size.
In your example, we have a population with a finite and known number of elements, with a mean of 90, which is also known.

*

*You randomly picked 5 students whose average came out to be 85. In math language, that is written as $\dfrac{1}{5}\sum_{i=1}^5 X_i = 85$

*When $n\rightarrow \infty$ the distribution can be approximated by a
continuous function, and we can use integrals instead of sums. In your example, we can use sums directly. Assuming all probabilities $p_i, \  i=1,2,...,35$ are equal, then the first moment of your distribution is $$\mu = \mathbb{E}(X) =\sum_{i=1}^{35} X_i p_i = \dfrac{1}{35}\sum_{i=1}^{35} X_i=90$$
