# p-value of binary results

I have a list of ages and then a binary value associated with it (e.g. is the person overweight)

I would like to calculate from this the p-value.

I have plotted the values and then calculated the probability that at a certain age the person is overweight, but I don't think this is the p-value.

• p-values are usually discussed in the context of an experiment, but I don't see anything indicating that you are comparing two groups. Perhaps you misunderstand the nature of hypothesis testing and p-values? en.wikipedia.org/wiki/Statistical_hypothesis_testing Jan 10, 2019 at 16:38

We have a sample of individuals and are given their ages and whether or not they are considered overweight based on their weight being above or below some threshold. Given this data, I would like to know if people who are overweight tend to be of a higher age than people who are not overweight. Given this question, I can then construct the following hypothesis in which $$\mu(x)$$ is the population mean age of overweight individuals and $$\mu(y)$$ is the population mean age of non-overweight individuals:
$$H_{0}: \mu_{x} = \mu_{y}$$
$$H_{A}: \mu_{x} > \mu_{y}$$