Monday, March 23, 2015

in-class experiment link

https://www.surveymonkey.com/r/YFJM5FS

T-test overview

Often in social science situations, we want to see if there is a statistical difference between two groups.

That is, are any recorded differences due to "chance" (not significant), or are they NOT due to chance (significant)?

To determine if the differences are significant, we use a simple inferential statistical test called the t-test.

Here's how we solve for t:

t = X1 - X2/ Sm1 - Sm2

where X1 = mean (average) of the first group and X2 = mean (average) of the second group, and Sm = standard error of the mean.

So, for example, let's say we have two groups of students in an experiment where we're trying to test whether or not kids can learn their multiplication facts better via a TV show than in school.

Let's say we bring in 20 kids and we randomly assign them to two groups. The first group of 10 learns their multiplication facts via TV show, and the second group of 10 learns via the traditional classroom approach.

So we have something like this:

# of TV kids = 10
# of class kids = 10
Overall N = 20

We examine their scores and we see that the TV kids averaged a 2/10 on a post-test quiz measuring multiplication facts and the traditional class kids averaged a 6/10 on the same test.

Normally, you'd have to solve for the Sm, but-- since this is an 11-day online course-- I'm just going to provide it to you to simplify the process (plus, it's simple to solve and most statistical packages provide it as a matter of course, so almost never do you solve for it by hand). Let's say that the Sm = 1.05.

Ok, so here's what we do--

We solve for t like this:

t = 2 - 6/1.05

t = -4/1.05

t = 3.81 (we always take the absolute value)

This value, in and of itself, tells us nothing.

Just like chi-square, however, we have to be concerned about degrees of freedom (df).

The df for a t-test is simple-- you take the N for the group and subtract one. So, for the first group, the df is 9 (10-1), and for the second group it's also 9 (10-1).

9 + 9 = 18, so the df = 18.

So, now armed with this info, we can check out the t-value chart (either the one in the book, or one we find easily online-- like here for example-- t-test table), and we see that in order to be significant with 18 df (at the .05 level), the t-value needs to be greater than 2.10.

Since our t-value of 3.81 is higher than 2.10, we say that there is a significant difference between the groups.

We then look back at our original data and we see that the traditional kids scored, on average, much better than the TV kids, so we conclude that it's better to use the traditional method.

(Typically, in experimental settings, we never make such a claim without several iterations of the experiment).

Get it?

Chi-square overview

When we talk about inferential statistics, we're simply determining whether or not the results we obtained were due to chance, or not due to chance.

(Inferential means that, if our sample is representative, we can INFER from our sample that the results are indicative of the entire population).

If they are not due to chance, we suggest a relationship between variables. If it is due to chance, we can not make such a claim.

Think of inferential stats as a light switch-- it's either on or off. In the social sciences, if the significance is .05 or lower (that is, we allow for 95% confidence), then we say the switch is "on" and the results are "significant"-- meaning that we are 95% sure that the results are NOT due to chance.

If p (the probability that the results would show up like this by chance) is HIGHER than .05, then we say there is NO significance-- which means we can't argue that the variables are related.

Well, we already know that if we have a nominal IV and a nominal DV, then we test using chi-square.

Chi-square is a simple statistical test.

Put simply, chi-square is the sum of the observed frequency minus the expected frequency, squared-- divided by the expected frequency.

The observed frequency is simply the number reported. The expected frequency is what you'd expect if it were completely by chance.

It's best explained with an example.

Suppose we had the following data:

We asked 97 people about their political affiliations (let's assume it's a random sample) and we got this:

Gender-------Republican------ Democrat----- Row Total

Male:-----------  23---------------- 17------------ 40 

Female:--------- 20---------------- 37------------ 57

Column Total:---43----------------54------------ 97


Our hypothesis is:

H1: Women are more likely to be affiliated with the Democratic party than men.

By looking at the raw data, it's difficult to say, with certainty, that this is the case, so we test the hypothesis using chi square.

Our first order of business is to find the "expected" frequency.

The "expected" frequency is R x C / N (where R is the ROW total; C is the COLUMN total; and N is the overall number.

So the ROW total for men is 40.
The ROW total for women is 57.

The Column total for Republicans is 43.
The Column total for Democrats is 54.

The overall N is 97.

The expected frequency for males who should be Republicans based on chance is 40 x 43, which is 1,720 / 97 = 17.73.

Ok, so now we know that the observed frequency for men who are Republicans is 23, and the expected frequency is 17.73. This gives us a difference of (5.27). We square this value and get 27.77.

Once we have that value, we divide by the expected value and get this-- 27.77/17.73 = 1.57 (we always round to the nearest hundredth).

Remember, though, chi-square is the SUM OF, so we have compute it for each cell.

So, we repeat the process for each "cell" and then add up the totals.

Once we have the sum of the chi-squares, we check with a chi-square chart to see if it's significant at the .05 level. You can check here-- chi-square chart.

You'll note something called "degrees of freedom," or "df." A df helps us to determine what line to look at on the chart. The easiest way to remember df is this-- it's (R-1) x (C-1) where R is the number of rows and C is the number columns. In this case, we have 2 rows and 2 columns, which gives us a df of 1 because (R-1) = (2-1), and (C-1) = (2-1), and 1 x 1 = 1.

Also, remember that we use the .05 level of significance.

Go ahead and solve for the sum of chi-square and post what you get. Tell me if it's significant and whether the hypothesis is supported.

Jack

Intro to Statistics (Overview)

Statistics are mathematical methods to collect, organize, summarize, and analyze data. Statistics provide valid and reliable results only when the data collection and research methods follow established scientific procedures. With the development of the computer, the science of statistics has changed dramatically.

Basic statistical procedures include:

descriptive statistics,
sample distribution, and
data transformation.

In descriptive statistics, the chapter presents the concept of data distribution, frequency distribution, cumulative frequency, histogram, bar chart, frequency polygon, normal curve, and skewness.

Summary statistics make data more manageable by measuring two basic tendencies of distributions: 1) central tendency; and 2) dispersion (variability). These statistics make it easier for researchers to understand data.

Central tendency statistics provide information about the grouping of numbers in a distribution by giving a single number that characterizes the entire distribution. Using the mode, median, and mean, researchers can figure out a typical score of a distribution.

In addition, dispersion measures describe the way scores are spread out about a central point. Using range, variance, and standard deviation, allows researchers to understand the characteristics of the data.

The term sample distribution—the distribution of some characteristic measured on an individual or other unit of analysis that were part of a sample. Additionally, it's important to understand the notion of a sampling distribution—a theoretical probability distribution of all values of a variable for a given sample size.

Most statistical procedures are based on the assumption that the data are normally distributed. When some anomalies arise, researchers can attempt to transform the data to achieve normality. Data transformation can be possible by multiplying or dividing each score by a certain number, or taking the square root or log of the scores.

Hypothesis Testing Overview

Hypothesis development in scientific research is important because the process refines and focuses research by excluding extraneous variables and permitting variables to be quantified.

Scientists rarely begin a research study without a problem or a question to test. Without research questions or hypotheses, research proves to be a waste of time.

Researchers develop studies based on existing theory and are thus able to make predictions about the outcome of their work. Therefore, hypothesis development is usually the culmination of a rigorous literature review (we don't have the time to conduct a full-scale literature review in this class, so our theories will be based on our own experiences).

Researchers should use hypotheses in scientific research to:

1) provide direction for a study;
2) eliminate trial-and-error research;
3) rule out intervening and confounding variables; and,
4) allow for quantification of variables.

In addition, hypotheses should be:

1) compatible with current knowledge in the area;
2) logically consistent;
3) stated concisely; and,
4) testable.


In hypothesis testing, a researcher either rejects or fails to reject the null hypothesis that the statistical differences being analyzed are due to chance or random error.

To determine the statistical significance of a research study, the research must set a probability level (significance level) against which the null hypothesis is tested. If the results of the study indicate a probability lower than this level, the researcher can reject the null hypothesis. If the research outcome has a high probability, the researcher fails to reject the null hypothesis. It is common practice in mass media research studies to set the probability level at .05, which means that either one or five times out of 100, significant results of the study occur because of random error or chance. Another way to think of this is to say that "we are 95% confident that our results are not due to chance."

All research contains error. Typically, two types of error (Type I error: the rejection of a null hypothesis that should not be rejected, and Type II error: the acceptance of a null hypothesis that should be rejected) are relevant to hypothesis testing.

There is always the possibility of making an error in rejecting or failing to reject a null hypothesis. It is not easy for researchers to balance these two error types, but one procedure, power analysis, helps researchers deal with the problem. Because power (the probability of rejecting the null hypothesis when it is true) indicates the probability that a statistical test of a null hypothesis will result in the conclusion that the phenomenon under study actually exists, if there is a difference, researchers are able to detect it.

Sunday, March 22, 2015

Exam #2 Date: April 6, 2015

The date of the second exam is April 6, 2015.

It will be an open-book, open-resource exam.

Jack


Big Data Show that Nepotism Rules in America

THERE is a very real chance that the presidential election in 2016 will pit Jeb Bush against Hillary Clinton. According to oddsmakers, this is the likeliest outcome.
Many Americans are uncomfortable with the idea that two families could dominate the presidency that way. Whether or not you like one of the candidates, it just doesn’t feel right, in part because a second Bush-Clinton election makes a mockery of our self-identification as a democratic meritocracy.
How bad is America’s nepotism problem? Can data science help us gauge its depth? It can — and what the data shows is that something has gone haywire.
I studied the probability of male baby boomers’ reaching the same level of success as their fathers. I had to limit myself to fathers and sons because this was a highly sexist period in which women held few powerful political positions.
Let’s start with the presidency. Thirteen sons of presidents were born during America’s baby boom. One of the 13 became president himself, of course, and Jeb would make a second. Of the roughly 37 million boomer males who weren’t born to a president, two won the White House. Maybe it’s an anomaly that George W. Bush became president in 2001, but his advent means that in our era a son of a president was roughly 1.4 million times more likely to become president than his supposed peers.
The presidency is obviously a small sample. But the same calculations can be done for other political positions. Take governors.
Because it is difficult to be sure that you have counted all the sons of governors, let’s assume that governors reproduce at average rates. This would mean there were about 250 baby boomer males born to governors. Five of them became governors themselves, about one in 50. This is 6,000 times the rate of the average American. The same methodology suggests that sons of senators had an 8,500 times higher chance of becoming a senator than an average American male boomer.
There is some evidence that the parental advantage in politics is actually getting bigger. George W. Bush ended a 171-year drought for presidential sons. From 2003 to 2006, the Senate had the highest percentage of senators’ children — six — in its history.
Continue reading the main story

Thanks, Dad!

Thirteen sons of presidents were born during America's baby boom. One, George W. Bush, also became president. Below are the odds that a boomer man matched his father's achievement — compared to the odds for the average male boomer.
BILLIONAIRES
1 in
9
1 in
258,141
followed
dad’s
footsteps
average
boomer
men
Ross Perot, Ross Perot Jr.
PRESIDENTS
1 in
13
1 in
18,715,250
George W. Bush, George Bush
SENATORS
1 in
47
1 in
398,197
Al Gore Sr., Al Gore Jr.
GOVERNORS
1 in
51
1 in
306,807
Mitt Romney, George Romney
M.L.B. PLAYERS
1 in
73
1 in
14,966
Barry Bonds, Bobby Bonds
N.F.L. PLAYERS
1 in
113
1 in
7,220
Dave Shula, Don Shula (shown later as coaches)
Is this electoral edge unusual? Successful parents, whatever their occupation, pass on their genes and plenty of other stuff to their kids. Do different fields have similar familial patterns?
In just about every field I looked at, having a successful parent makes you way more likely to be a big success, but the advantage is much smaller than it is at the top of politics.
Using the same methodology, I estimate that the son of an N.B.A. player has about a one in 45 chance of becoming an N.B.A. player. Since there are far more N.B.A. slots than Senate slots, this is only about an 800-fold edge.
Think about the N.B.A. further. The skills necessary to be a basketball player, especially height, are highly hereditary. But the N.B.A. is a meritocracy, with your performance easy to evaluate. If you do not play well, you will be cut, even if the team is the New York Knicks and your name is Patrick Ewing Jr. Father-son correlation in the N.B.A. is only one-eleventh as high as it is in the Senate.
The parental edge in football and baseball is much lower than it is in basketball, probably because there is less reliance on height.
I went through a wide range of fields and found a consistent pattern: greater success for the sons, but nothing like the edge a winning politician provides.
Here is the estimated parental edge for other big American prizes and positions. An American male is 4,582 times more likely to become an Army general if his father was one; 1,895 times more likely to become a famous C.E.O.; 1,639 times more likely to win a Pulitzer Prize; 1,497 times more likely to win a Grammy; and 1,361 times more likely to win an Academy Award. Those are pretty decent odds, but they do not come close to the 8,500 times more likely a senator’s son is to find himself chatting with John McCain or Dianne Feinstein in the Senate cloakroom.
THE Bush story is also telling, when we compare it to familial success in other fields.
Has any modern family dominated a meritocracy the way that the Bushes dominate politics? I could not find one. The Mannings, in football, probably come closest. But while Archie Manning, the father of two Super Bowl-winning quarterbacks, Peyton and Eli, was a solid N.F.L. player, he was hardly the football equivalent of a president.
Internationally, the greatest father-son, merit-based, same-field accomplishment is probably Niels Bohr’s son Aage matching his father’s Nobel Prize in Physics. But neither the Bohrs nor the Mannings dominated physics or football the way the Bush family dominates American politics.
Regression to the mean limits family dominance in any meritocratic field. If you have a well-above-average dose of a trait, you can expect your child to be closer to average.
Regression to the mean is so powerful that once-in-a-generation talent basically never sires once-in-a-generation talent. It explains why Michael Jordan’s sons were middling college basketball players and Jakob Dylan wrote two good songs. It is why there are no American parent-child pairs among Hall of Fame players in any major professional sports league.
The Bush family’s dominance would be the basketball equivalent of Michael Jordan being the father of LeBron James and Kevin Durant — and of Michael Jordan’s father being Walt Frazier.
In other words, it is virtually impossible, statistically speaking, that Bushes are consistently the most talented people to lead our country. Same for Chelsea Clinton or any other member of a political dynasty thought to be possible presidential timber.
Politics is not the absolute worst field in giving an advantage to certain families. In my research, I found two fields with a bigger family edge.
First is billionaires. According to my calculation, you have about a 28,000 times higher chance of being a billionaire if your father was a billionaire. And billionaires like the Waltons or the Rockefellers before them probably dominate American wealth more than the Bushes dominate American politics.
These billionaires, of course, have inherited their status, not earned it. Call me jaded, but it seems to me that most heirs to billionaires don’t do much more than marry nice-looking people and take sports franchises that I support and run them into the ground.
The second group is reality TV stars. You have about a 9,300 times edge in becoming a reality television star if your father is one. But this is precisely because some of these shows star famous people’s families.
We should not take this criticism too far. In 2008, the United States chose the mixed-race son of a Kenyan and a Kansan to be president. More than 90 percent of senators had parents who weren’t top politicians. And political campaigns can be unpredictable. For all we know, the 2016 election could be fought between Senator Elizabeth Warren, daughter of a janitor, and Gov. Scott Walker, son of a minister.
Unless of course the Democratic candidate is Andrew M. Cuomo, son of a governor, and the Republican candidate is Rand Paul, son of a congressman.
There are plenty of countries that are worse. Over the past 50 years, being the son of a leader of North Korea increased your probability of being a leader of North Korea by a factor of infinity. An infinite advantage to having a powerful father has been common in human history.
But Big Data allows us not just vague comparisons to other countries or time periods. We can see precisely how much families dominate in many different spheres and we can see what true meritocracies look like. The data shows conclusively that we have a nepotism problem. So now the question is: Why does the modern United States tolerate this level of privilege for political name brands?