There is an element of luck in it.
Looking at the code, EA isn't particularly verbose (seriously, they call things "num4" or "float" instead of "chanceOfWinning") so interpreting it isn't easy. Anyone interested in looking at it (who has the means to), start with looking at Sims3.Gameplay.Actors.Sim.CheckForLotto().
Essentially there are eight levels for winning with different base numbers, $50, $100, $500, $1,000, $5,000, $50,000, $100,000, $1,000,000. So winning at level 4 will net you (at least) $1000. These levels are unrelated to anything else, they're just there because each level has it's own modifiers.
Traits don't do anything to do with it for levels one and two of the winnings ($50 and $100). Insider Tip will increase the chance of winning the last three levels ($50,000 and up).
The game examines each price level and checks what you're eligible to win, and uses the FIRST level it finds. So let's say you had a 100% chance of winning level 6. The game would examine the levels. If you lost the first four, and won the fifth, the 100% chance for six wouldn't matter since the game examines level 5 first, determines you win that, and you win it.
So for best results, maximize your odds of winning big money, and lower your odds of winning low money. That's why the figures are varied, like Twinmum posted.
As a side note, Advanced Technology does NOT modify your chances of winning; it makes it so that if you do win, you win more. At each level of Advanced Technology, your winnings are multiplied by the following:
Level Zero (no skill): 1
Level One: 1.05
Level Two: 1.1
Level Three: 1.15
Level Four: 1.25
Level Five: 1.3
Level Six: 1.4
Level Seven: 1.5
Level Eight: 1.75
Level Nine: 2
Level Ten: 3
As I say, interested code readers should start with Sims3.Gameplay.Actors.Sim.CheckForLotto() (in Sims3GameplaySystems).