Probability question: what's the sample space? I was solving this question, and while I can obtain the correct answer, I'm unsure what the sample space is.
A medical test is positive in 99% of the cases where a person in a certain population has a certain disease. But it also gives a false 'positive' result in 1% of the cases where the person is actually healthy. What is the probability that a person is sick if the test is positive, given that 0.5% of the population has the disease.
I think the sample space is the following:
Let P be the population in the question and for $p \in P$, we write $H_p$ if the person is healthy and $S_p$ if the person is sick. 
Then the sample space $\Omega$ is $$\bigcup_{p \in P} \{H_p,S_p\}$$
Is this correct? Is it a good thing tl keep in mind sample spaces when approaching problems, because here it seems rather useless. 
 A: The OP has already shown that s/he knows how to solve the Bayes' Theorem question in the comments.  Here I'll discuss only the question of how to represent the sample space.
In my experience, most often if we want our sample space to be equiprobable to facilitate probability calculations by using counting methods, we will think of the sample space as the population of people about which our data is collected and from which we will be asking probability questions about.  I'll refer to the set of people as $\Omega$.  In doing so, we will need to have a function or functions which give information about the person(s) selected.
For example, let $Info$ be a function $\Omega\to \{0,1\}^2$ where $Info(p)=\begin{cases}(0,0)&\text{if the person is healthy and tested negative}\\(1,0)&\text{if the person is sick and tested negative}\\(0,1)&\text{if the person is healthy and tested positive}\\(1,1)&\text{if the person is sick and tested positive}\end{cases}$
This is the only information relevant to the Bayes' theorem question, and so all of it must be included in how we define $Info$, but we could have had more information able to be conveyed by $Info$ if we so wished or if we wanted to later change the problem... for example by including age as a factor, or gender, mother's maiden name, favorite color, or even what brand perfume they use.  The possibilities are endless, and are mostly irrelevant.
If you wish not to define a function (or acknowledge the existence of such a function) outside of the sample space, you could simply include the information within the sample space itself, letting our sample space be instead $$\left\{(p,S_p,T_p)~:~p\in\Omega\right\}$$ where $$~S_p=\begin{cases}0&\text{if the person is healthy}\\1&\text{if the person is sick}\end{cases},~T_p\begin{cases}0&\text{if the person tested negative}\\1&\text{if the person tested positive}\end{cases}$$
We could also have defined our sample space to be something else entirely where we don't care about it being equiprobable, in which case we could have simply taken our sample space as being $\{(0,0),(0,1),(1,0),(1,1)\}$, or heck... even worse as simply $\{0,1\}$.  These samplespaces are less than useful though as they are either not equiprobable or don't convey enough information to describe each event.

In your attempt at defining a sample space, not only is the notation horribly awkward, you have not included any reference to whether or not the person tested positive or negative for the illness.

As mentioned elsewhere in comments as well, actually taking the time to define the sample space adequately for every problem is generally a waste of time.  We know that we can define it if we wanted to, but the action of doing so plays little or no role in actually arriving at an answer to the question we were originally being asked.
