Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass[]{article}
- usepackage{pgfplotstable}
- usepackage{pgfplots}
- begin{document}
- The C.D.F is as follows:
- [F(x)=
- begin{dcases}
- 0&text{$x<1$}\
- frac{11}{36}&text{$1leq x<2$}\
- frac{20}{36}&text{$2leq x<3$}\
- frac{27}{36}&text{$3leq x<4$}\
- frac{32}{36}&text{$4leq x<5$}\
- frac{35}{36}&text{$5leq x<6$}\
- 1&text{$xgeq 6$}\
- end{dcases}
- ]
- The C.D.F can be graphed as follows:
- {centering
- begin{tikzpicture}
- begin{axis}[
- clip=false,
- jump mark left,
- ymin=0,ymax=1,
- xmin=0, xmax=5,
- every axis plot/.style={very thick},
- discontinuous,
- table/create on use/cumulative distribution/.style={
- create col/expr={pgfmathaccuma + thisrow{f(x)}}
- }
- ]
- addplot [red] table [y=cumulative distribution]{
- x f(x)
- 0 0
- 1 11/36
- 2 20/36
- 3 27/36
- 4 32/36
- 5 35/36
- 6 1
- };
- end{axis}
- end{tikzpicture}
- par}
- end{document}
- documentclass[]{article}
- usepackage{amsmath,mathtools}
- usepackage{pgfplotstable}
- usepackage{pgfplots}
- begin{document}
- The C.D.F is as follows:
- [F(x)=
- begin{dcases}
- 0&text{$x<1$}\
- frac{11}{36}&text{$1leq x<2$}\
- frac{20}{36}&text{$2leq x<3$}\
- frac{27}{36}&text{$3leq x<4$}\
- frac{32}{36}&text{$4leq x<5$}\
- frac{35}{36}&text{$5leq x<6$}\
- 1&text{$xgeq 6$}\
- end{dcases}
- ]
- The C.D.F can be graphed as follows:
- begin{center}
- begin{tikzpicture}
- begin{axis}[
- clip=false,
- jump mark left,
- %ymin=0,ymax=1,
- %xmin=0, xmax=5,
- every axis plot/.style={very thick},
- %discontinuous,
- table/create on use/cumulative distribution/.style={
- create col/expr={pgfmathaccuma + thisrow{f(x)}}
- }
- ]
- addplot [red] table [y=cumulative distribution]{
- x f(x)
- 0 0
- 1 11/36
- 2 20/36
- 3 27/36
- 4 32/36
- 5 35/36
- 6 1
- };
- end{axis}
- end{tikzpicture}
- end{center}
- end{document}
Add Comment
Please, Sign In to add comment