... or, at least, break even.

"Pick a number between 1 and n" is a dispute resolution method sometimes used when two people want something that another person is giving away. The idea is that the giver chooses a number between 1 and n and keeps it secret, while the people who want the thing also each choose a number between 1 and n. The two contestants then reveal their numbers, and the one who chose a number closest to the secret number is the winner. There are several variants - where the scale "wraps" (i.e. 1 is closer to n than n-3), for example - that may break this trick, but the standard version make up the bulk of examples. The great thing about this method is if you're prepared (and possibly just a bit lucky/devious - see order selection below), you will win at least 50% of the time against a prepared opponent, and stand a variable (depending on their choice) but good chance of beating someone who isn't prepared.

Order Selection:

This is where you decide who gets to choose first. If n is an even number, this is easy - you want to choose second. Be nonchalant about it, or your opponent will know something's up. If you're forced to go first, you will still win 50% of the time, but you give up your added chances of beating a sucker. On the other hand, if you're forced to go first, you probably weren't nonchalant enough and deserve what you get, or are facing a prepared opponent, in which case it doesn't matter.

On the other hand, if n is an odd number (it usually isn't, for some reason - unless the giver is also prepared and a little cruel), you've got a choice to make. If the person who goes first is prepared (or isn't, but makes a lucky guess), they can always secure an advantage; how great depends on the value of n. On the other hand, if the person who goes first makes a stupid choice, the person who will choose second is going to clean his or her clock. Try to decide: has your opponent given this much thought, and are you the careful type? If either answer is yes, try to go first.

If you choose second, here's how it goes:

1. Your opponent chooses a number, x. If n is even and x is anything but n/2 or n/2+1 (5 or 6 for "pick a number between 1 and 10"), you own them. If n is odd and x is anything but n/2 rounded up, you own them. If n is odd and they choose n/2 rounded up, you should have gone first.
2. You choose a number, y. If x is above n/2, choose x-1; otherwise choose x+1.

So: since the standard "pick a number" works by proximity, you've just secured all the numbers above x or below x, which is at least half of the possible values (unless you blew your order selection; now you've got half the values - 1.) It usually looks something like this if you're facing an unprepared opponent:
1 - - - - y x - - 10 : you've got 1-6, and thus a 60% chance of winning, or
1 - x y - - - - - 10 : you've got 4-10, and thus a 70% chance of winning. At worst:
1 - - - x y - - - 10 or 1 - - - y x - - - 10 : you've got 1-5 or 6-10, and are looking at winning 50% of the time.

Now, if you blew your order selection (or a sucker got lucky), you're looking at this:
1 - - y x - - - 9 : your opponent has edged you out just a bit.

If you choose first, here's how it goes:

1. If n is even, your number (y) should be n/2 or n/2+1, it doesn't matter. If n is odd, choose n/2 rounded up for y. Notice these are the values you don't want your opponent to choose if they go first. Funny, that!
2. Your opponent chooses. If they're prepared, they choose x as you were advised to do above. Otherwise, they do something stupid and increase your chances of winning. Hoorah!

If n is even, they've got at best:
1 - - - x y - - - 10 or 1 - - - y x - - - 10 : you still will win 50% of the time.
Of course, if they're a total sucker, it looks something like this:
1 x - - y - - - - 10 : you own 4 through 10 and will win 70% of the time.
If you were playing it careful or knew they were prepared, they're in the unenviable position:
1 - - x y - - - 9 : you've got the slight advantage.

Conclusion

Of course, who wins depends all along on what number is chosen in secret. If the giver doesn't want you to win, they may change their number to favor your opponent. It's not a bad idea to make him or her write the secret number down before any choosing happens (although this can be a sign that you're plotting someting, so be careful!)

Clearly, "pick a number" is not a truly random selection method, nor is it really a true test of skill. At worst, it's a test of who wins the coin toss, if you and your opponent are playing with a random n and know not to yield first choice, or at best, a test of who thinks beforehand. Shouldn't that always be you, in any case?

Pender says: "I'm not at all certain that "Pick a number" numbers are uniformly distributed, which your write-up sort of relies on. The unaided human mind is remarkably bad at randomness", and Life101 points out "there's a small problem with your "pick a number" solution... And that is the simple fact that people virtually always choose 7 when picking a number between 1-10, otherwise..." A non-random choice by the number-chooser will certainly tend to affect the outcome. If you have good information on the way the numbers tend to be skewed (7 does seem to show up a lot) then you've got a good way to decrease the disadvantage of having to choose first: if, in the example above, the secret number is more likely to be 7, then choose 6 and increase your chances! On the other hand, if your opponent is more likely to choose certain numbers that aren't as close to n/2 as possible, then - let's hear it for the non-random brain, because it's probably going to hand you a nice advantage. As always, forewarned is forearmed.

Thanks also to m_turner for advice on better formatting.