Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- data := {{1, 0}, {2, 0}, {3, 1}, {4, 1}, {5, 5}, {6, 4}, {7, 11}, {8,
- 24}, {9, 18}, {10, 20}, {11, 9}, {12, 6}, {13, 0}, {14, 0}, {15,
- 1}, {16, 0}, {17, 0}, {18, 0}}
- model[x_] = ampl Evaluate[PDF[NormalDistribution[x0, sigma], x]];
- fit = FindFit[data, model[x], {ampl, x0, sigma}, x]
- Show[ListPlot[data],
- Plot[model[x] /. fit, {x, 0, 19}, PlotStyle -> Red],
- AxesLabel -> {"# of Heads", "# of Trials"}]
Add Comment
Please, Sign In to add comment