Example: Let’s say prior studies have shown that, nationally, speeding tickets are given more often to red cars than they are to blue cars. Let’s say the average results nationally show a 2:1 preference for red cars. We want to find out whether or not the police in our town also demonstrate this bias by analyzing speeding tickets given by our town’s police. If we take a random pool of 150 speeding tickets given to either red or blue cars in our town, we would expect 100 to be for red cars and 50 to be for blue cars if our town’s police force gives tickets according to the national bias.
Example: Let’s say that, in our town, we randomly selected 150 speeding tickets which were given to either red or blue cars. We found that 90 tickets were for red cars and 60 were for blue cars. These differ from our expected results of 100 and 50, respectively. Did our experimental manipulation (in this case, changing the source of our data from a national one to a local one) cause this change in results, or are our town’s police as biased as the national average suggests, and we’re just observing a chance variation? A p value will help us determine this.
Example: Our experiment has two categories of results: one for red cars and one for blue cars. Thus, in our experiment, we have 2-1 = 1 degree of freedom. If we had compared red, blue, and green cars, we would have 2 degrees of freedom, and so on.
Example: Our experiment has two categories of results: one for red cars and one for blue cars. Thus, in our experiment, we have 2-1 = 1 degree of freedom. If we had compared red, blue, and green cars, we would have 2 degrees of freedom, and so on.
Note that this equation includes a Σ (sigma) operator. In other words, you’ll need to calculate ((|o-e|-. 05)2/e) for each possible outcome, then add the results to get your chi square value. In our example, we have two outcomes - either the car that received a ticket is red or blue. Thus, we would calculate ((o-e)2/e) twice - once for red cars and once for blue cars. Example: Let’s plug our expected and observed values into the equation x2 = Σ((o-e)2/e). Keep in mind that, because of the sigma operator, we’ll need to perform ((o-e)2/e) twice - once for red cars and once for blue cars. Our work would go as follows: x2 = ((90-100)2/100) + (60-50)2/50) x2 = ((-10)2/100) + (10)2/50) x2 = (100/100) + (100/50) = 1 + 2 = 3 .
Note that this equation includes a Σ (sigma) operator. In other words, you’ll need to calculate ((|o-e|-. 05)2/e) for each possible outcome, then add the results to get your chi square value. In our example, we have two outcomes - either the car that received a ticket is red or blue. Thus, we would calculate ((o-e)2/e) twice - once for red cars and once for blue cars. Example: Let’s plug our expected and observed values into the equation x2 = Σ((o-e)2/e). Keep in mind that, because of the sigma operator, we’ll need to perform ((o-e)2/e) twice - once for red cars and once for blue cars. Our work would go as follows: x2 = ((90-100)2/100) + (60-50)2/50) x2 = ((-10)2/100) + (10)2/50) x2 = (100/100) + (100/50) = 1 + 2 = 3 .
It is a common misconception that p=0. 01 means that there is a 99% chance that the results were caused by the scientist’s manipulation of experimental variables. [6] X Trustworthy Source PubMed Central Journal archive from the U. S. National Institutes of Health Go to source This is NOT the case. If you wore your lucky pants on seven different days and the stock market went up every one of those days, you would have p<0. 01, but you would still be well-justified in believing that the result had been generated by chance rather than by a connection between the market and your pants. By convention, scientists usually set the significance value for their experiments at 0. 05, or 5 percent. [7] X Research source This means that experimental results that meet this significance level have, at most, a 5% chance of being reproduced in a random sampling process. For most experiments, generating results that are that unlikely to be produced by a random sampling process is seen as “successfully” showing a correlation between the change in the experimental variable and the observed effect. Example: For our red and blue car example, let’s follow scientific convention and set our significance level at 0. 05.
Chi square distribution tables are available from a variety of sources - they can easily be found online or in science and statistics textbooks. If you don’t have one handy, use the one in the photo above or a free online table, like the one provided by medcalc. org here. Example: Our chi-square was 3. So, let’s use the chi square distribution table in the photo above to find an approximate p value. Since we know our experiment has only 1 degree of freedom, we’ll start in the highest row. We’ll go from left to right along this row until we find a value higher than 3 - our chi square value. The first one we encounter is 3. 84. Looking to the top of this column, we see that the corresponding p value is 0. 05. This means that our p value is between 0. 05 and 0. 1 (the next-biggest p value on the table).
Example: Our p value is between 0. 05 and 0. 1 . It is not smaller than 0. 05, so, unfortunately, we can’t reject our null hypothesis. This means that we didn’t reach the criterion we decided upon to be able to say that our town’s police give tickets to red and blue cars at a rate that’s significantly different than the national average. In other words, random sampling from the national data would produce a result 10 tickets off from the national average 5-10% of the time. Since we were looking for this percentage to be less than 5%, we can’t say that we’re sure our town’s police are less biased towards red cars.