Your chance of having the winning ticket in the raffle or lottery are the same.
If the lottery and the raffle have the same total prize amount for the winning ticket, the raffle has a higher potential financial reward.
This is not due to the raffles guaranteed winner, but due to the chance of having multiple winners in the lottery.
You are setting the odds of winning your hypothetical lottery at 1:500k.
The chance of your winning raffle ticket being drawn out of 500,000 tickets is exactly 1:500k. So the chances of winning either are exactly the same.
So your expected payout would depend on how much the prize is for each contest, how much you paid for your ticket, and like barker said, who you have to share with.
The lottery odds should be -1:500,000. Because if there is a winning ticket your odds are 1:500,000. But if no winning ticket is drawn, well, no one wins.
But a raffel would truly yeild a winner. Because if you reach in the bucket and pull out 1 of the 500,000 tickets. Someone will win everytime.
The chance for any given person to win is 1:500,000 in either case. The difference is, in the lottery, each chance is independent, whereas in the raffle, the chances are not. This changes some aspects of the overall game statistics, but not all. In particular, if the prizes in each are the same, and are given out multiple times if there are multiple lottery winners (as opposed to being split amongst the winners, as in most lotteries), the expected value of a ticket is the same, regardless of which game it is purchased for.