New Posts
  • Hi there guest! Welcome to PoliticalJack.com. Register for free to join our community?

Any stats or programming geeks out there?

Arkady

President
This came up in the context of a political argument, but it's really more of a math issue. The question is, if you're playing one-on-one basketball, and you're the better player, should you prefer "make-it-take-it" rules (a player who scores takes the ball out again to start the next possession), or standard rules (after someone scores, it's his opponent's turn to have a possession), strictly in terms of maximizing your chance of winning.

Obviously, not every game is won by the better player. If the players are fairly evenly matched, a few lucky bounces can hand a game to the weaker player. So, the question I posed is essentially a question of how to set up the game rules to minimize the role of luck in the contest (since the less luck factors in, the more likely you, the stronger player, will win). I would have thought that standard rules were better at that, since it cuts down on streaks (a lucky shot leading to the player getting another chance to make a lucky shot). And maybe that's the way it would work out in the real world, where human psychology is at play (and where relative strengths at offense and defense would matter, not just overall strength). But, to my surprise, it doesn't seem to play out that way in the realm of pure numbers.

Here's how I set it up as a simulation. I had a computer play 100,000 games, each of exactly 100 possessions (more like a full 5-on-5 game than 1-on-1, but I was looking for big numbers to generate reliable stats). The game was very simple. Each "player" picked a random number between 0 and 1. But to simulate one player being more skillful than the other, one multiplied his result by 5.1, while the other multiplied his by 4.9. Whoever had the higher number won that "possession." The game starts with a random choice for possession of the ball, and if the team with possession wins the number comparison, he scores a point and gets the ball again for the next possession. If not, nobody scores and the other team gets the ball for the next possession. After 100 total possessions, the points are totaled for each player, to find the winner.

After running the game that way 100,000 times, I changed the rules, so that now if a player with possession won the number comparison, he got the point, but the OTHER player got the next possession, with the rules otherwise being the same. Then I ran 100,000 versions of that game.

Anyway, as I said, the results surprised me. After 20 million total possessions, the computer indicated that the first version of the game ("make-it-take-it"), the stronger player won 63.368% of the games, whereas with standard rules he won 61.589%. In other words, the ability to "streak" to multiple points on consecutive possessions actually benefited the stronger player, rather than acting as a wildcard in favor of the weaker player.

I'm wondering if anyone here has the stats skills to prove or disprove that result, or the programming skills to replicate the experiment through some other method to test my conclusion. It only took me maybe 30 minutes to set up and run the experiment, so it needn't be a big time suck. Thanks for any help someone can provide.

Anyway, if you're curious how this comes up in the political context, it's around the question of how important skill is, versus luck, in economic success. My argument is that how important it is depends on how the system is set up -- that even superficially neutral rules may actually increase or decrease the role of luck in a game. An extreme version can be seen by imagining a game of 1-on-1 where two player compete to be the first to reach 10 points, but first they roll a die and they start with however many points they roll (meaning the luckier player could start with as much as a five point lead, before the ball is even put in play). It's a superficially neutral rule, but it would make the game much worse at showing which player is actually better at basketball, and it would result in weaker/lazier players winning more often than they would without that variation. The make-it-take-it variation, apparently, works the other way: making the better player win more often than he otherwise would. My idea is that our economic system should be designed with an eye to trying to minimize the role of luck (whether it's the luck of being born into a rich family, or the luck of a literal or figurative lottery hit), so that the harder workers and more skillful people tend to come out ahead more often.
 
... so that the harder workers and more skillful people tend to come out ahead more often. ???

Liberals cannot fathom that concept.... that is called a combo of freedom and capitalism.
 
This came up in the context of a political argument, but it's really more of a math issue. The question is, if you're playing one-on-one basketball, and you're the better player, should you prefer "make-it-take-it" rules (a player who scores takes the ball out again to start the next possession), or standard rules (after someone scores, it's his opponent's turn to have a possession), strictly in terms of maximizing your chance of winning.

Obviously, not every game is won by the better player. If the players are fairly evenly matched, a few lucky bounces can hand a game to the weaker player. So, the question I posed is essentially a question of how to set up the game rules to minimize the role of luck in the contest (since the less luck factors in, the more likely you, the stronger player, will win). I would have thought that standard rules were better at that, since it cuts down on streaks (a lucky shot leading to the player getting another chance to make a lucky shot). And maybe that's the way it would work out in the real world, where human psychology is at play (and where relative strengths at offense and defense would matter, not just overall strength). But, to my surprise, it doesn't seem to play out that way in the realm of pure numbers.

Here's how I set it up as a simulation. I had a computer play 100,000 games, each of exactly 100 possessions (more like a full 5-on-5 game than 1-on-1, but I was looking for big numbers to generate reliable stats). The game was very simple. Each "player" picked a random number between 0 and 1. But to simulate one player being more skillful than the other, one multiplied his result by 5.1, while the other multiplied his by 4.9. Whoever had the higher number won that "possession." The game starts with a random choice for possession of the ball, and if the team with possession wins the number comparison, he scores a point and gets the ball again for the next possession. If not, nobody scores and the other team gets the ball for the next possession. After 100 total possessions, the points are totaled for each player, to find the winner.

After running the game that way 100,000 times, I changed the rules, so that now if a player with possession won the number comparison, he got the point, but the OTHER player got the next possession, with the rules otherwise being the same. Then I ran 100,000 versions of that game.

Anyway, as I said, the results surprised me. After 20 million total possessions, the computer indicated that the first version of the game ("make-it-take-it"), the stronger player won 63.368% of the games, whereas with standard rules he won 61.589%. In other words, the ability to "streak" to multiple points on consecutive possessions actually benefited the stronger player, rather than acting as a wildcard in favor of the weaker player.

I'm wondering if anyone here has the stats skills to prove or disprove that result, or the programming skills to replicate the experiment through some other method to test my conclusion. It only took me maybe 30 minutes to set up and run the experiment, so it needn't be a big time suck. Thanks for any help someone can provide.

Anyway, if you're curious how this comes up in the political context, it's around the question of how important skill is, versus luck, in economic success. My argument is that how important it is depends on how the system is set up -- that even superficially neutral rules may actually increase or decrease the role of luck in a game. An extreme version can be seen by imagining a game of 1-on-1 where two player compete to be the first to reach 10 points, but first they roll a die and they start with however many points they roll (meaning the luckier player could start with as much as a five point lead, before the ball is even put in play). It's a superficially neutral rule, but it would make the game much worse at showing which player is actually better at basketball, and it would result in weaker/lazier players winning more often than they would without that variation. The make-it-take-it variation, apparently, works the other way: making the better player win more often than he otherwise would. My idea is that our economic system should be designed with an eye to trying to minimize the role of luck (whether it's the luck of being born into a rich family, or the luck of a literal or figurative lottery hit), so that the harder workers and more skillful people tend to come out ahead more often.

Mr Arkady,

One thing, there is no such thing as luck. But your concept is correct. Rather than try to rig the game by giving the weaker player a boost, you should award the stronger player.
 
Mr Arkady,

One thing, there is no such thing as luck.

Not sure what to make of that. Is that an Einsteinian "Gott wuerffelt nicht" comment, what? I mean, I'm as uncomfortable with quantum mechanics as the next guy, but I think it's fairly well established that there are probabilities at work in everything. You can flip a perfectly fair coin and sometimes it'll come up tails five times in a row, through sheer dumb luck.
 
I did the simulation as you described and basically got the same results:

make-it-take-it:
player1_wins: 63760 (%63.76), player2_wins: 32558 (%32.56), ties: 3682 (%3.68)

alternate possession:
player1_wins: 61433 (%61.43), player2_wins: 31249 (%31.25), ties: 7318 (%7.32)

Seems to be fewer ties in the "make-it-take-it" game.
 
that has nothing to do with luck. luck is just a word we have invented to try and explain we dont intuitively grasp.
 
Not sure what to make of that. Is that an Einsteinian "Gott wuerffelt nicht" comment, what? I mean, I'm as uncomfortable with quantum mechanics as the next guy, but I think it's fairly well established that there are probabilities at work in everything. You can flip a perfectly fair coin and sometimes it'll come up tails five times in a row, through sheer dumb luck.

Mr. Arkady,

That is not luck, but rather, random chance. The reason coin toss can come up tails five times in a row is because each flip is an independent event with a fifty-fifty chance it will come up with tails.
 
that has nothing to do with luck. luck is just a word we have invented to try and explain we dont intuitively grasp.

Mr. Gabe,

God d-amn it, that's two times today I agree with you (sorry, I mean, you agree with me). I knew something felt strange about the day when I showed up for work.
 
I think the problem with applying your test model to a much more complex and subjective instance like "economic success", is threefold.

First of all, the difference in "quality/skill" between your stronger player and your weaker player, is actually very small (.2 out of 10). Second, even this very small difference results in a "landslide" win, under either set of rules. And third...the practical difference between winning 61.5% of the time and 63.5% of the time, isn't very useful to us. (It would be far more useful if say, the difference was 49% to 51%).

Clearly, the driver here, is skill level, not the "rules". If you were to place a wager on one or another, what would you rather know, their skill level or what rules the game would be played by? BUT..in terms of putting this model to any practical use, how could we possibly discern such a miniscule, albeit essential difference in skill?
 
I understand probability. I'm not meaning to refer to luck in some mystical sense of an ability to influence random events. I just mean chance. If that word works better for you, go with that. What I'm saying is that in sports and economics and many other games, it's not always the more skillful player that wins. Unpredictable events can happen that override skill.

Two entrepreneurs set up restaurants on the same block. The one who manages his a bit better and works a bit harder starts out doing better, but unfortunately he called his restaurant "Hitler's", after himself, and then some nutty Austrian fascist with the same last name hits the news, the restaurant is irredeemably stigmatized by its unfortunate name, and it promptly goes out of business. that's the kind of chance I'm trying to model.

Anyway, I'm curious whether anyone can confirm or refute my results, about whether make-it-take-it actually helps the more skillful player win more often.
 
Granted, economic success is far more complex than the model. But there are very rough equivalents to the concept of game design in determining the importance of skill/hard work. For example,with two equally smart and hard-working investors, we expect the one who started with more money to have a higher rate of return on his investments. The larger your investment, the smaller the transaction cost typically is in proportional terms, meaning the less your rate of return is knocked down by those costs. And there are whole classes of investments you can't even get access to without a lot of money, and sources of critical investment information that are uneconomical to access unless you're investing huge sums. So, absent progressive taxation of dividends and capital gains, we'd expect the richer investor to pull away from the poorer one, if both were equally smart and hard working (In fact, a richer Investor would outperform a superior poorer investor, if the skill gap were smaller than would be needed to overcome the bias of the game rules in favor of the richer investor). Progressive taxation of capital gains and dividends could be designed to try to offset that, by giving richer investors a tax disadvantage equal to their market advantage, so that the more skillful investor was generally expected to get the better rate of return, whether he started out richer or poorer.

As for the scenario I ran, the landslide result is due to the high number of possessions. In a one-possession game, the results would be very different (even Michael Jordan playing Stephen Hawking could win no more than 50% of the games, since he'd only win 50% of the opening coin flips, and if Hawking won, the best Jordan could do would be to steal the ball, ending the first and only possession, creating a 0-0 tie). The more possessions in the game, the higher the winning percentage for the more skillful player. With possessions approaching infinity, his winning percentage would approach 100%. Again, this points to the importance of the rules of the game in determining how much skill dominated the results. You can design games with a lot of chance (e.g., "Monopoly") or games with none (e.g. Chess). In economics, things are so complex you'll never eliminate the role of chance, but you can certainly increase of decrease it from where we are.
 
The stats are fairly simple. Its simply a variation of the a coin toss but with an unfairly weighted coin made a bit more complex because the second event is dependent on the first (ie you can't score unless you took the ball in). so you have a conditional Probability case. Essentially this is a Bayesian conditional probability.

In pure variaiance of there is a 20% differentiation, (5.1 out of ten vs 4.9 out of ten is a 20% difference) you have a simple "weighted coin toss" example. http://haqqmisra.wordpress.com/2006/11/09/weighted-coin-predictions/


Again extrapolating this to economics and our economic system is a lot harder - because there isn't a single iteration that you can assign a weighted probability to. But studies show that socio-economic status of Parents is a primary determinant of overall success.
 
Interesting. Thanks. Out of curiosity, what did you use to set that up?

I used Perl:

Code:
#!/usr/bin/perl

$possession_rule = 1;   # 1 => make-it-take-it, 2 => alternate
$num_games = 100000;
$num_possessions = 100;
$player1_skill = 5.1;
$player2_skill = 4.9;

$player1_wins = 0;
$player2_wins = 0;
$player_ties = 0;

for $i (0..$num_games-1)
{
        $whos_turn = rand() < .5 ? 1 : 2;
        ($player1_pts,$player2_pts) = (0,0);

        for $j (0..$num_possessions-1)
        {
                $r1 = $player1_skill * rand();
                $r2 = $player2_skill * rand();
                $possesion_winner = $r1 > $r2 ? 1 : 2;
                $player1_pts++ if ($possesion_winner == 1 && $whos_turn == 1);
                $player2_pts++ if ($possesion_winner == 2 && $whos_turn == 2);
                $whos_turn = ($possession_rule eq 1)
                    ? $possesion_winner : ($whos_turn == 1 ? 2 : 1);
                #print "$r1, $r2\n";
        }
        #print "$player1_pts, $player2_pts\n";
        $player1_wins++ if ($player1_pts > $player2_pts);
        $player2_wins++ if ($player2_pts > $player1_pts);
        $player_ties++ if ($player1_pts == $player2_pts);
}

$player1_pct = sprintf("%4.2f",100.*$player1_wins/$num_games);
$player2_pct = sprintf("%4.2f",100.*$player2_wins/$num_games);
$tie_pct = sprintf("%4.2f",100.*$player_ties/$num_games);
print "player1_wins: $player1_wins (\%$player1_pct), player2_wins:
$player2_wins (\%$player2_pct), ties: $player_ties (\%$tie_pct)\n";
 
Think of it like a flip of the coin. If one player makes fifty percent of his shots and the other player makes sixty percent of his, he would (naturally) prefer "make it take it." Every play the odds are stacked in his favor. There is no such thing as "lucky streaks" in statistics.
 
Since having money obviously improves one's odds of success, all other factors being neutral, are you suggesting we should prohibit parents from spending any of their wealth on their children in the pursuit of more equal outcomes?
 
Back
Top