- #1

karush

Gold Member

MHB

- 3,269

- 5

%preamble \usepackage{pgfplots}

\newcommand\gauss[2]{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))} % Gauss function, parameters mu and sigma

\begin{axis}[every axis plot post/.append style={

mark=none,samples=50,smooth}, % All plots: 50 samples, smooth, no marks

axis x line*=bottom, % no box around the plot, only x axis

axis y line=none, % the * suppresses the arrow tips

enlargelimits=upper, % extend the axes a bit to the right and top

domain=-4:4, % Default for all plots: from -4:4

xtick={1,2},

xticklabels={$1$,$2$},

width=10cm,

height=4cm]

\addplot [fill=cyan!30, draw=none, domain=1:2] {\gauss{0}{1}} \closedcycle;

\addplot {\gauss{0}{1}};

\end{axis}

\end{tikzpicture}

ok this was for P(1<z<2) scaled the graph to .6

the ultimate answer of course is the area in the domain which I don't know if we can derive from the gauss{}{} function

I tried to put the newcommand quass{}{} in the preamble of Overleaf but it didn't take

also thot since all 12 of homework problem are just graphing P()

be nice just have a newcommand \Pg with arguments but also need code that can be colabortive with Overleaf and MHB

again mega mahalo for all the help