BOSTON — Workers of all ages are much less likely to die on the job in Massachusetts than in other states.

An Associated Press analysis of federal statistics found that while the rate of workplace fatalities has decreased nationally, older people are dying on the job at a higher rate than workers overall.

In Massachusetts, the workplace death rate for older people has been a bit higher than the overall rate in the last decade, but both rates have been among the lowest in the country for most of those years.

The number of older people in the workplace is increasing as baby boomers reject the traditional retirement age of 65. In 2015, workers age 55 and over made up 24 percent of the workforce in Massachusetts.