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

Any stats or programming geeks out there?

Now I'm really confused. You just attacked me for posting a story about a principal in a public school renaming St. Patrick's Day. You whined that because it was so much different from the stories that were important to you, I had no business posting about something so trivial. But now here you are, babbling about some silly game and computer programming.

I'm just trying to figure out the standard here. Who decides what is too trivial to post about?

But here, let me help you out, as you seem to have trouble with the concept of free speech. While free speech clearly is limited to the rules and whims of the owners of this web site, a principal remains. We are free to post about whatever we want to post about. While I think you're silly to post about something as trivial as a silly game, I do not think it is up to me to tell you that your topic shouldn't be posted on.

That said, if you genuinely cannot see the difference between to total and complete triviality of your topic and the importance of scrutinizing the people running our public schools, there is simply no hope for you- NONE.

I suggest that while you point your finger at me, you take a look at yourself.

Have a nice day. And I truly hope you begin to understand that when a public school principal makes what you say are silly decisions that mean nothing, that's simply not the case. Actions mean things, and they are often a look into the mindset of a person. And the mindset of the principal in question is questionable. And hell yes it's important, given the power to control, indoctrinate and shape the minds of a young, captive audience.

And your post here.... you dare to criticize me for making what you say is an inane post, then come up with THIS nonsense?

Frankly, a few words come to mind: hilarious, hypocritical, desperate.

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.
 
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";

Thanks, so much, for sharing. I don't know Perl, so I'm going to puzzle that code over for a minute and see if I can figure it out. Looks pretty similar to C++ though.
 
Are you "better" on offense, or defense?

I ignored that question because it makes it more complicated. But, I'd think, someone who's better on offense would prefer make-it-take-it, since it gives him a chance to seize control with his strength and not be forced back into his weakness every time he scored.
 
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.

Yeah. Now that I'm thinking about it more clearly, I've got a better feel for why the stronger player is helped a little by being able to retain the ball.
 
Thanks, so much, for sharing. I don't know Perl, so I'm going to puzzle that code over for a minute and see if I can figure it out. Looks pretty similar to C++ though.

Well this code doesn't quite do it... because it assumes that if Player1 does not score, Player2 gets possession. And "MakeItTakeIt" isn't quite played under those rules. For example if Player 1 "takes it in"...and player 2 steals the ball at the top of the key before the shot, Player 1 has to take it back to midcourt, but if Player 2 steals it back in the process, Player 2 still gets to drive for the basket.

You are making a bunch of simplifying assumptions. - which is OK, but understand how they are simpliflying.


What you really want underlying this statisitcally is A Markov Chain probability - IE where the Next State is dependent on the previous state http://www.dartmouth.edu/~chance/teaching_aids/books_articles/probability_book/Chapter11.pdf A Markov Chain is driven by a "Transition Matrix" between the states.


Player A takes in Next
Player B Takes in NExt
Player A takes in (51%)
51%
49%
Loserly Player takes in (49%)
49%
51%

You then iterate on this matrix.
 
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?

No. To put it in economic terms, I think it's impossible to entirely erase the correlation between a parent's financial success and a child's, and it would be a mistake to even move forward with the idea that's the goal. Parents want to help set their kids up for success, and a lot of the ways they do so are actually quite good for society as a whole, so we don't want to interfere with those. But it isn't unrealistic to think we can somewhat decrease the magnitude of that correlation, so that results are more sensitive to individual effort of the child than to lucky parentage. The US, in the past, had greater economic mobility, and many nations in Europe currently do.

As an example, consider schooling options. To go to one extreme, if there was no public school and no public subsidies for private schooling, we'd expect that to create a much larger correlation between parent and child wealth -- get born into the kind of family that can pay for private schooling, and you'll have a vast leg up on the huge portion of the population that is nearly illiterate because their parents couldn't afford schooling. To the other extreme, we could force absolutely all kids into some sort of public boarding schools where contact with their parents wasn't allowed, and neither were private tutors, private study aids, or anything else that could be used to give a rich kid a leg up on his poor classmate. Even that wouldn't completely eliminate the correlation (since rich parents could find ways before and after that border school period to give their kids a leg up), but it would make a huge dent. But I'm not looking for anything close to that extreme. Rather, I'm looking to have excellent, high-quality public schooling for the masses, financed in part by highly progressive taxes. That lets the rich continue to give their kids a leg up with private schools, tutors, etc., but makes it so a hard-working kid from a poor family still has a great shot at a world-class education.

It's similar with estate taxation. I wouldn't tax estates 100%, so that one generation has no ability to give the next generation any unearned wealth. But I would at least tax inheritance as regular income, subject to progressive rates, with only small exemptions, to somewhat diminish the ability for unproductive lines to be upper class indefinitely through inherited wealth.

For me, it would be about a practical effort to make the playing field as level as possible without triggering the kinds of negative side-effects that would outweigh the positive ones. I'd accept that sometimes lazy people are going to be richer than hard-working ones for no better reason than parentage. But I'd at least recognize that's an unfortunate by-product of our market system that we should be trying to keep in check, rather than allowing the system to become less and less economically fluid over time.
 
PRetty good suggestions...

1) Tax inheritance as the unearned income that it is.

And for education, I'd implement something the new Provost of University of Washington has suggested:

Free College education for any student that gets admitted. BUT for the next 20years - they pay a 5% excise tax on their income that goes back into the tuition fund. This is prorated by the number of years you attend. So Bill Gates, who attended Harvard for 2 years, would have had his income for the next 10 years taxed.

that would have been about $100million in taxes for the education fund.
 
No. To put it in economic terms, I think it's impossible to entirely erase the correlation between a parent's financial success and a child's, and it would be a mistake to even move forward with the idea that's the goal. Parents want to help set their kids up for success, and a lot of the ways they do so are actually quite good for society as a whole, so we don't want to interfere with those. But it isn't unrealistic to think we can somewhat decrease the magnitude of that correlation, so that results are more sensitive to individual effort of the child than to lucky parentage. The US, in the past, had greater economic mobility, and many nations in Europe currently do.

As an example, consider schooling options. To go to one extreme, if there was no public school and no public subsidies for private schooling, we'd expect that to create a much larger correlation between parent and child wealth -- get born into the kind of family that can pay for private schooling, and you'll have a vast leg up on the huge portion of the population that is nearly illiterate because their parents couldn't afford schooling. To the other extreme, we could force absolutely all kids into some sort of public boarding schools where contact with their parents wasn't allowed, and neither were private tutors, private study aids, or anything else that could be used to give a rich kid a leg up on his poor classmate. Even that wouldn't completely eliminate the correlation (since rich parents could find ways before and after that border school period to give their kids a leg up), but it would make a huge dent. But I'm not looking for anything close to that extreme. Rather, I'm looking to have excellent, high-quality public schooling for the masses, financed in part by highly progressive taxes. That lets the rich continue to give their kids a leg up with private schools, tutors, etc., but makes it so a hard-working kid from a poor family still has a great shot at a world-class education.

It's similar with estate taxation. I wouldn't tax estates 100%, so that one generation has no ability to give the next generation any unearned wealth. But I would at least tax inheritance as regular income, subject to progressive rates, with only small exemptions, to somewhat diminish the ability for unproductive lines to be upper class indefinitely through inherited wealth.

For me, it would be about a practical effort to make the playing field as level as possible without triggering the kinds of negative side-effects that would outweigh the positive ones. I'd accept that sometimes lazy people are going to be richer than hard-working ones for no better reason than parentage. But I'd at least recognize that's an unfortunate by-product of our market system that we should be trying to keep in check, rather than allowing the system to become less and less economically fluid over time.

So are you suggesting we should somehow provide a handicap that gives the ghetto crack baby the exact same shot at a successful outcome as a brilliant Upper East Side son of Asian immigrants? How would you start to do that? Who pays whatever the cost is to accomplish that? At what point does society decide it just makes more sense to limit everyone else's opportunities because there is no amount of effort that can get some kids up to speed?
 
So are you suggesting we should somehow provide a handicap that gives the ghetto crack baby the exact same shot at a successful outcome as a brilliant Upper East Side son of Asian immigrants?
MU... as in you are making an assumption that doesn't have a basis.

You are assuming that AT BIRTH the Upper East Side son of Asian Immigrants is inherently brilliant. And the lower socioeconomic status kid is not. And the data DOES NOT SUPPORT THAT.
 
MU... as in you are making an assumption that doesn't have a basis.

You are assuming that AT BIRTH the Upper East Side son of Asian Immigrants is inherently brilliant. And the lower socioeconomic status kid is not. And the data DOES NOT SUPPORT THAT.

Sheesh!
 
Are you able to calculate based on that to get an expected winning percentage under each scenario? I probably had the math skills to puzzle this out as a formula 15 years ago, but these days the best I can do is to just run it as a simulation over enough iterations to get an approximation.
 
Are you able to calculate based on that to get an expected winning percentage under each scenario? I probably had the math skills to puzzle this out as a formula 15 years ago, but these days the best I can do is to just run it as a simulation over enough iterations to get an approximation.
I have to dig out my old Markov Chain textbook - and I've got meetings this afternoon - but you've peaked my interest so I'm probably going to work on that Sunday.
 
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.

You mean like Ayds Diet Candy.
 
Again, if you are going to raise "mu" questions - you deserve to be called out on them. Particularly when they are racist in the way this one was.

No, I used an example that illustrated both ends of the spectrum. And you tried to tell me I can't use my example because, well I don't really know why (your post was inscrutable). Double sheesh!!!
 
Well first. If the game ends when someone scores 10 points, then how many points do we have to spot the minority player?
 
I have to dig out my old Markov Chain textbook - and I've got meetings this afternoon - but you've peaked my interest so I'm probably going to work on that Sunday.

Well, thanks if you do! One of the things I most regret is letting my math skills go to crap. I took two years of advanced math as an undergrad, when I started as a Physics major, but these days I'm useless.
 
Never heard of that. Funny.

They were around for decades before the disease became known as AIDS. Here's a commercial from 1981, when AIDS was still being called Gay Cancer, or sometimes GRID (Gay Related Immune Deficiency).

[video=youtube;yfFs0o6pCxc]http://www.youtube.com/watch?v=yfFs0o6pCxc[/video]
 
Back
Top