BOSTON (AP) _ Arizona, New Hampshire and Maryland have the best track record for creating new jobs and businesses and stimulating growth of young companies in the last four years, according to a survey released Monday.

Inc. magazine's annual report on the states concludes that the South and Southwest are thriving, but notes that some industrial states are making a comeback thanks in part to programs that use small amounts of tax dollars to foster private growth.

Independent business analysts said the desert belt of Arizona and California and the rest of the South continues to benefit from lower wages, warm climate and the surge in defense-related industries under the Reagan administration.

''The states in the South and some in the Southwest have in fact lower wages and do attract business and continue to expand based on their lower cost of doing business,'' said Lew Hurt, regional group associate director for Data Resources, the Lexington-based economic forecasting firm.

The Inc. survey measures how a state has done in stimulating entrepreneurial activity and economic expansion. It reflects the state economies' success over a four-year period in job generation, new-business creation and young-company growth.

For instance, Arizona earned its third consecutive top ranking with 23.1 percent job growth since 1984 and 1,769 new companies with at least 10 employees for a 2.87 percent business birthrate, while 4 percent of companies founded since 1980 were rated fast-growing.

Wyoming, last for the second straight year, lost 10.9 percent of its jobs, had a 0.8 percent business birthrate and a 0.97 percent rate of growing businesses.

Some notable changes include Texas, which slipped from 12th to 20th with a job growth of just 2.9 percent due to the slumping oil industry.

High-tech industry spinoffs from California and Massachusetts contributed to high rankings for Arizona, New Hampshire and even Maine, which jumped to 15th from 26th. Analysts said paper mills have shifted production to computer paper from plain, old yellow pads.

But the main explanation for the rankings is the growth in federal defense expenditures.

''A lot of these states are where they are because of what has happened in the last four to six years in the federal defense buildup,'' said Stanley Duobinis, director of regional forecasting for the Wefa Group in suburban Philadelphia.

Many new electronics firms concentrated in Phoenix have defense contracts. No. 5 Virginia boats the Pentagon and naval shipyards in Newport News. Maryland, where Bethlehem Steel once was the largest employer, now hosts companies such as Westinghouse and Bendix Defense Systems.

''You'll find a lot of those electronics firms are indeed in that San Diego out to Phoenix area,'' Duobinis said. ''A lot of that has been defense stimulated.''

Proximity to universities also influences growth of high-technology and medical research companies, economists said.

Maryland has the National Institutes of Health and Johns Hopkins University, No. 11 North Carolina its academic ''research triangle'' and No. 12 Massachusetts, which fell from ninth place, Harvard University and the Massachusetts Institute of Technology.

Economists said the decline in the value of the dollar and improving foreign trade figures have been the major reasons for economic optimism in the slumping industrial Midwest.

In the Inc. survey, Michigan, Indiana and Ohio - Nos. 23, 24, 25 - each showed job growth of over 10.7 percent since 1984, and economists said most of it has come in the last two years. Pennsylvania rose to 28th from 32nd with a strong 3.2 small company growth rate.

''They've been down so long that there's only one way to really to go and that's up,'' Hurt said.

Michigan was cited for using small amounts of public money to create incentives for larger private investment. Inc. said Ohio now offers matching grants to promising new companies, while Indiana offers tax credits to citizens who invest in a venture capital fund to support businesses.

Inc., based in Boston, used data from the Bureau of Labor Statistics and Cognetics Inc., a Cambridge-based researcher, for the survey, which appears in the magazine's October issue.