Guest User

Untitled

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