Database Reference
In-Depth Information
How it works...
We can see that the function its all right, but not great. The fatalities for 55 miles per hour
seem like an outlier, too. The amount of road mileage may be skewing the data since there
are so many miles of road with a speed limit of 55 mph. It stands to reason that there will also
be more accidents at that speed limit. If we could get even an approximation of how many
miles of roads are marked for various speed limits, we could compare the ratio of fatalities by
the miles of road for that speed. This might get more interesting and useful results.
We should also say a few words about the parameters of the sine wave function:
F A is the amplitude. This is the peak of the wave.
F ω is the angular frequency. This is the slope of the wave, measured in radians
per second.
F ϕ is the phase. This is the point of the waves' oscillation where t=0.
F t is the time along the x axis.
Modeling multinomial Bayesian distributions
A multinomial distribution is one where every observation in the dataset is taken from one
of a limited number of options. For example, in the race census data, race is a multinomial
parameter: it can be one of seven options. If the census were a sample, how good of an
estimate of the population would the ratios of the race observations be?
Bayesian methods work by updating a prior probability distribution on the data with more
data. For multivariate data, the Dirichlet distribution is commonly used. The Bayesian process
observes how many times each option is seen and returns an estimate of the ratios of the
different options from the multimodal distribution.
So in the case of the census race data, this algorithm looks at the ratios from a sample and
updates the prior distribution from those values. The output is a belief about the probabilities
of those ratios in the population.
Getting ready
We'll need these dependencies:
(defproject statim "0.1.0"
:dependencies [[org.clojure/clojure "1.6.0"]
[incanter "1.5.5"]])
 
Search WWH ::




Custom Search