NEW YORK - Brooklyn residents and all New Yorkers can expect about $24.6 billion in federal aid from President Barack Obama?s stimulus package, according to a state analysis that was released Saturday.

The economic recovery, which was passed by the U.S. Senate Friday, totals $787 billion. Gov. David Paterson said the federal aid will go to education, infrastructure projects and direct benefits to low-income and unemployed New Yorkers primarily over the next two years.

Gov. Paterson, Mayor Michael Bloomberg, Sen. Chuck Schumer and other state officials have discussed how the money will be spent among different state programs and projects. About $1.25 billion is expected to go toward New York City transit improvement projects and proposed fare hikes. New York will also receive a share of $8 billion designated in the stimulus for railroad projects nationwide. According to Schumer, the money will be used for a high-speed rail service from New York City to Buffalo. State officials say $1 billion of aid could produce 10,000 construction and permanent jobs.

About $11 billion is slotted for Medicaid funding in the state for the next three years, as well as $2.5 billion to restore education cuts proposed by Paterson over the next two fiscal years.

Nearly $1.3 billion will go toward food stamps, and an additional $1.3 billion toward extending unemployment benefits for up to 59 weeks. Other money to be allocated in the new spending plan will cover child care costs for working, low-income parents, as well as projects to weatherize homes, hire new police officers and improve city public housing.

AP wire services contributed to this article