As he plans his wagers on each race at Belmont Park, Weldon Irvine has to decide whether to use his big computer or his little computer.

He carries two portable computers to the track every day, because each is programmed with a different system that tells him how much to bet on a race. Although he uses unimaginative methods to pick horses--often relying on the opinions of various public handicappers--he believes that the crucial decision is the way he bets them.

"I thought that money management would lend itself to computer analysis much better than handicapping," Irvine said, and he claims that his results this year have verified that assumption. By manipulating his money in the right way, he says, he has produced profits that would have been impossible with ordinary flat bets, much less the helter-skelter money management that most horseplayers employ.

Irvine is one of an increasing number of bettors who are approaching the game seriously from this standpoint, and many intriguing money-management systems are finding their way into print. James Selvidge, author of the book "Hold Your Horses," advises horseplayers to establish a flat amount per bet and increase it by the square root of their accumulated profits. (If a bettor started by playing $50 a race, and had amassed profits of $400, the size of his bet would increase to $70 per race.) Don Passer, who teaches a course in handicapping at the New School in New York, advises bettors to set a goal for daily profits and recommends a system to implement this philosophy.

But the most intriguing of the betting systems was devised by a Bell Telephone Co. mathematician named J.L. Kelly Jr., and in some circles the Kelly Criterion has become a magic phrase.

In the 1950s, Kelly wrote a paper about a technical problem in the communications field, and although it was laced with advanced calculus he tried to simplify the issue with an analogy; the analogy he chose was gambling. Suppose, he said, a telephone man intercepted the flow of sports results on a wire to an illegal bookie parlor, and could bet on the game knowing the results. How much should he bet? The answer was obvious: everything he had; i.e., 100 percent of his capital. But now, Kelly asked, what if there was a slight possibility--say, 5 percent--of a transmission error on the wire? How much of his bankroll should he bet now to achieve the optimal results?

Not many people could have comprehended the ensuing mathematics, but one who did was Huey Mahl, a Las Vegas gambler and author. Recognizing the enormous bearing of Kelly's work on everyday gambling decisions, Mahl made a presentation on the subject at a symposium in 1979, which has been summarized by James Quinn in his recently published book, "The Literature of Thoroughbred Handicapping 1965-1982."

Mahl explained that the optimal size of a bet should be a percentage of the bettor's bankroll that is equal to his advantage over the game. This advantage is calculated simply: Win Percentage minus Loss Percentage. If a blackjack player encountered a situation where he expected to win 52 percent of the time, his advantage would be 4 percent (52 minus 48). He should therefore bet 4 percent of his bankroll. Over a period of time, any other size of wager would produce inferior results.

How does this theory apply to horse-race betting? Quinn offers a formula: % Advantage = Win% -- (Loss %/$ odds)

Quinn suggests that handicappers tabulate the results of their selections over a period of time to determine if an equal bet on each would show a profit.

If a handicapper were skillful enough to pick 40 percent winners at average odds of 2.50 to l, his advantage would be 40 -- (60/2.5), or 16 percent. Thus he should bet 16 percent of his total bankroll each wager.

Not many handicappers are that good. But Weldon Irvine says he doesn't have to be. He looks for certain situations in which certain types of horses show a flat-bet profit. He has found, for example, that betting favorites in allowance-class sprints at Belmont Park would yield a profit. The profit would be minimal, under ordinary circumstances, but by applying the Kelly Criterion he can give himself the optimal return--a process that seems as magical as alchemy.