140 likes | 236 Views
Random Thoughts 2012 (COMP 066). Jan-Michael Frahm Jared Heinly. Benford’s Law. 242 countries in the world First digit of the population of each country. Benford’s Law. 242 countries in the world First digit of the population of each country. Confidence Interval.
E N D
Random Thoughts 2012(COMP 066) Jan-Michael Frahm Jared Heinly
Benford’s Law • 242 countries in the world • First digit of the population of each country
Benford’s Law • 242 countries in the world • First digit of the population of each country
Confidence Interval • Margin of error of N samples z*= Number of samples needed:
Average weight of population • Average weight deviation in preliminary experiment is σ=30 lb • Confidence level of 99% (z*=2.58) • How many do we need to ask to have a MOE of 2 lb?
What is a random sample? • Random subset of your test population • Randomly chosen voters, buyers, … • Sample represent the population • represents the student population of UNC • Which of these subsets are random? • All students in this class • Drawn by lottery from Connect Carolina • Students on the lawn • Random students asked at noon in Lenor Hall • ✗ • ✓ • ✗ • ✗
What can go wrong? Many factors can keep a poll from being a perfect indicator of how all of the people in the population think, feel, or behave. Here are just a few of the ways a poll can end up being a lot less than 100% accurate: • Phone book for selection of names at random to call • never question people with unlisted phone numbers or people who do not have a phone. • Research indicates that most phones are answered by women or older people. • interview only the people who answer, you will have a biased sample! • Phone leaves only small time frame (evening to reach people) • About 50% of registered voters do not vote • poll of 500 registered voters might not include anyone who votes • Almost any question will bias the answer to some degree. • For example, the pollsters might ask was Gandhi 110 when he died. Then ask what age did he die? The 110 will make the average higher.
Roulette Wheel example • How do we know about the MOE for the roulette wheel example? • Sampling all occurrences for each number over 5 days
How many trials? • Margin of error for a population proportion • Depends on proportion in the population that had the characteristic we searched for • Example: Over the 5 days of sampling we saw 52 occurrences of the 29 within the 1800 observed trials. We want 99% confidence level (z*=2.58). Hence 2.9% ±1% for 29 on the roulette wheel (1/37=2.7%)
Roulette wheel • How many trials do we need to have a 0.1% margin of error with a confidence level of 99% • z*=2.58 • the number of samples is
Election Polls • a margin of error states the confidence in the data collected • 70% of voters would choose Clinton, with a margin of error of +/- 5% • This doesn’t mean that another poll would also find 70% of voters for Clinton but surely another poll would end up somewhere between 65% (70%-5%) and 75% (70%+5%) • Depending on the demographics of the polled people • Is not the probability of an error in the poll is the variation due to the sampling
How many do you have to ask? • Example: Asked students in this course about the student body president vote they cast. 10 students Leimenstolland 5 students Lewis. We want 95% confidence level (z*=1.96). Hence 67% ±24% for Leimenstoll
UNC student elections • How many students do we need to ask to have a 1% margin of error with a confidence level of 95% • z*=1.96 • the number of samples is
UNC student body president election • How does this change with respect to the number of people asked