Transcript random

Lecture 6
Paper 1
• Select an area of human endeavor (e.g., a
particular sport, marketing, politics, car
manufacturing …) and write a 5 page paper on
how statistics influenced it.
• Due on Thursday 9/29.
• Make sure you clearly reference your sources
(including websites)
Probability: the study of randomness
Randomness
Basic Probability models – language
Simulations
0.0
0.4
z
0.4
0.0
y
0.8
0.8
Randomness
0.0
0.2
0.4
0.6
0.8
1.0
0.0
0.2
0.4
0.6
0.8
1.0
u
x
• Which is random?
• Which is random?
• A lot more “structure than people give credit”
The language of probability
• In statistics, random means more than just unpredictable or haphazard.
• A random phenomenon is a situation in which
– the outcome is uncertain, but
– there would be a definite distribution of outcomes if the situation were
repeated many times under identical conditions. (And the same
distribution would result if it were repeated many times again.)
The language of probability
• Examples
– Toss a coin, note whether it comes up H or T
– Take a SRS from a population, find proportion who call themselves
Unaffiliated
– Choose 40 days at random from the 365 days of the year, check
whether any day is repeated
– Not a random phenomenon: UNC-Duke game, …
• In each example but the last, we can ask: what would we expect for the
distribution of outcomes after many repetitions? (That’s what makes
them random phenomena.)
Probability is expected long-run proportion
Results of a simulated series of 10,000 tosses of a fair coin
tosses
expected
results so far results so far
discrepancy
(observed –
expected)
proportion
of heads
1-10
8 H, 2 T
5 H, 5 T
+3 H
.8
11-50
23 H, 27 T
25 H, 25 T
–2H
.46
51-100
49 H, 51 T
50 H, 50 T
–1H
.49
101-500
248 H, 252 T
250 H, 250 T
–2H
.466
501-1000
475 H, 525 T
500 H, 500 T
– 25 H
.4750
1001-10000
4952 H, 5048 T
5000 H, 5000 T
– 48 H
.4952
The “law of averages” applies to the proportion of heads, not the
numbers of heads and tails.
It doesn’t operate by making up a discrepancy, but by swamping it.
R code
n=10000
p=.5
set.seed(2013)
u=runif(n)
x=(u>p)
y=cumsum(x)
print(y[c(10,50,100,500,1000,10000)])
print(c(10,50,100,500,1000,10000)-y[c(10,50,100,500,1000,10000)])
print(y[c(10,50,100,500,1000,10000)]-c(10,50,100,500,1000,10000)/2)
print(y[c(10,50,100,500,1000,10000)]/c(10,50,100,500,1000,10000))
#PLOT THE RESULTS
par(mfrow=c(2,2))
plot(1:30,x[1:30])
plot(1:n,y,type='l')
plot(1:n,2*y-1:n,type='l')
lines(c(0,n),c(0,0),lty=2)
plot(1:n,y/1:n,type='l')
lines(c(0,n),c(p,p),lty=2)
Plotting in R
• Commands
– plot(x,y,type=“l”)
• Creates a new plot (without the type=“l” plots dots)
– lines(x,y)
– points(x,y)
• Adds additional plot without erasing the old one
Probability is expected long-run proportion
The “law of averages” applies to the proportion of heads, not the
numbers of heads and tails.
It doesn’t operate by making up a discrepancy, but by swamping it.
Illustration to follow: a simulated coin-tossing game. On each toss, you win
$1 if the coin lands heads, and you lose $1 if it lands tails.
So, after a number of tosses, your net gain is
number of heads – number of tails.
(Net loss if this is negative.)
Should this be near zero after many tosses? Not necessarily.
The proportions of heads and tails will be near .5, but that doesn’t mean
the difference between numbers of heads and tails will be near zero.
Subjective probability
• The probability based on repeated sequence is
objective – independent on a user.
• Probability that UNC will win ACC title.
– Not objective – only one observation.
– We all have our own beliefs about that event.
– The probability can be evaluated using bets.
• If I am willing to bet 1:9 on UNC (win $9 if UNC wins, loose $1 if
they lose) my probability is >10%,
• If I am willing to offer 1:9 bet on UNC (loose $9 if UNC wins, win $1
if they lose) – my probability is <10%
– Can be objectified for an individual using a series of bets.
Betting sights
• Trade on future outcome – at expiry 100 if
happens/ 0 if it does not
• http://www.paddypower.com/bet/politics/
• http://tippie.uiowa.edu/iem/markets/
• In the past – intrade.com (closed by
regulators)