What Statistical test would be most appropriate for comparing death counts by age in two populations? I am not a statistician by any means, and am new to this. I have "patient" level data that has a persons death status, age, and gender. I want to compare it with the general population mortality.
Essentially, I have age ranges from:
<50
50-59
60-69
70-79
80+
along with corresponding mortality rates over a 1 year period for both the sample population (population 1) and general population. These two populations are NOT part of the same group (the first population is not just a sub sample of the general population). I'd like to see if the differences in death rates between the general population and this first population in 2020 are statistically significant.
Thus for an example it would look something like this:

I have base (denominator) population sizes for each, along with the amount of deaths in each group. What would the appropriate statistical test be to look into something like this - if there is one? The distributions of age is NOT the same in both groups, the general population having a typical age distribution but the first group having a much "younger" population.

I will illustrate a method, but this cannot be a formal answer.
For a conclusive answer, you would have to give sample counts instead
of percentages.
Hypothetically speaking, with only $n=100$ subjects in each population, a chi-squared test would show that
counts in the two populations have significantly different age distributions.
The null hypothesis of homogeneity would be strongly rejected at the 5% level
because the P-value of the (pretend) test is near $0.$
x1 = c(5, 8, 20, 40, 27)
x2 = c(30, 20, 40, 5, 5)
TBL=rbind(x1,x2);  TBL
   [,1] [,2] [,3] [,4] [,5]
x1    5    8   20   40   27
x2   30   20   40    5    5

chisq.test(TBL)

        Pearson's Chi-squared test

data:  TBL
X-squared = 72.014, df = 4, p-value = 8.524e-15

With population counts larger than $n = 100,$ you would also
find that age categories are not equally likely in the two populations.
For a serious report or paper intended for publication, you need
to show population counts.
