1

I would like to show some stimators properties in statistics. I'm very beginner in LaTeX, so I need some help.

wanted

  • 5
    Welcome to TeX.SX. Questions about how to draw specific graphics that just post an image of the desired result are really not reasonable questions to ask on the site. Please post a minimal compilable document showing that you've tried to produce the image and then people will be happy to help you with any specific problems you may have. See minimal working example (MWE) for what needs to go into such a document. –  Apr 23 '15 at 17:40
  • 7
    If you're a beginner, use \includegraphics from the graphicx package and draw your diagrams in whatever software you're familiar with. – cfr Apr 23 '15 at 18:17
  • As for statistical simulation, there are several example here about. http://tex.stackexchange.com/questions/148091/gaussian-random-numbers – John Kormylo Apr 23 '15 at 22:01
  • Thank you for your tips. I think i'm a beginner here too.Thanks a lot. – Anselmo Alves de Sousa Apr 25 '15 at 02:17

2 Answers2

2

This sort of diagram is quite easy to draw using tikz/pgf. It ha an extensive and well-written manual so by reading it you should get a good idea of what you need to do. Here is a similar example to get you started:

\documentclass[border=5mm,tikz]{standalone}
\usepackage{mwe}
\usepackage{tikz}
\begin{document}

  \begin{tikzpicture}
    \draw (0,0) circle[radius=1];
    \draw[red] (0,0) circle[radius=2];
    \draw[blue] (0,0) circle[radius=3];
    \foreach \x in {-1,0,1} {
      \foreach \y in {-1,0,1} {
        \node[fill=white] at (\x,\y) {x};
      }
    }
  \end{tikzpicture}

\end{document}

This produces the following picture:

enter image description here

If you wanted to draw x's at a particular list of coordinates the easiest way to do this is with something like:

\foreach \x/\y in {-1/1,0/1,-1/0,-1/0,0/0,1/0,-1/-1,0/-1,-1/-1} {
    \node[fill=white] at (\x,\y) {x};
}

In fact, this is equivalent to the code in the example above.

2

You can also draw this sort of thing nicely in Metapost, which you might enjoy learning. Here I've used the built-in normaldeviate command to generate some appropriate random target hits.

enter image description here

prologues := 3;
outputtemplate := "%j%c.eps";
beginfig(1);
numeric s;
picture target, cross;
s = 24;
target = image(for r=1 upto 3: draw fullcircle scaled (r*s); endfor);
cross  = image(draw (left--right) rotated 45; draw (left--right) rotated -45;);
picture A, B, C, D;
A = target shifted (-2s,+2s);
B = target shifted (+2s,+2s);
C = target shifted (-2s,-2s);
D = target shifted (+2s,-2s);

% mark "n" hits centered at "p" with "r" degree of scattering
vardef mark_hits(expr n, p, r) = 
  for i=1 upto n:
     draw cross shifted p shifted (r * normaldeviate, r * normaldeviate);
  endfor
enddef;

draw A; mark_hits(12, center A, 3); 
draw B; mark_hits(12, center B, 12);
draw C; mark_hits(12, center C shifted (-s/2,s/2), 3);
draw D; mark_hits(12, center D shifted (s/2,-s/2),12);

label.bot("(a)", 1/2[llcorner A, lrcorner A]);
label.bot("(b)", 1/2[llcorner B, lrcorner B]);
label.bot("(c)", 1/2[llcorner C, lrcorner C]);
label.bot("(d)", 1/2[llcorner D, lrcorner D]);

setbounds currentpicture to bbox currentpicture scaled 1.05;

endfig;


end
Thruston
  • 42,268