The U.S. economy gained a better-than-expected 171,000 jobs in October and more people were hired in the prior two months than previously believed, but the unemployment rate ticked up to 7.9% from 7.8%, the government said Friday. Economists surveyed by MarketWatch expected a 120,000 increase in jobs, with an unemployment rate of 7.9%. Employment gains for September and August were revised up by a combined 84,000. The number of new jobs created in September was revised to 148,000 from a prior estimate of 114,000, while August’s figure was revised to 192,000 from 142,000. The latest jobs report, coming just four days before the presidential election, is unlikely to change the trajectory of the race. Hiring has picked up over the past four months, but unemployment remains high. Yet the improved hiring trend is a welcome sign to Wall Street that the U.S. economy is still continuing to expand. The biggest increase in hiring last month occurred in professional services, health care, retail and leisure and hospitality. Average hourly wages, meanwhile, fell 1 cent to $23.58. The average workweek was unchanged for the fourth month in a row at 34.4 hours.