<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
     table(sample(rep(0:1,25),50,rep=FALSE))<br>
    <br>
     0  1 <br>
    25 25 <br>
    <div class="moz-cite-prefix">Em 01/05/2013 19:48, Daniel Marcelino
      escreveu:<br>
    </div>
    <blockquote
cite="mid:CAAjbdiKXb9yJ+DoQbfcbwGSkLVOQaKxnzdKgN_VQ5YmpbgeiMg@mail.gmail.com"
      type="cite">
      <div dir="ltr">Caros, estou realizando um experimento e acabei
        constatando que a semente que eu distribuir é fundamental para
        eu obter as amostras binárias.<br>
        Eu estou interessado em distribuir 25 unidades para tratamento e
        o restante para controle. Há alguma maneira de saber, sem ser
        por tentativa e erro, que minha distribuição terá 25 unidades em
        cada categoria? <br>
         Por exemplo,<br>
        <br>
        > # 50 Bernoulli trials<br>
        > set.seed(51)<br>
        > T <- sample(c(0,1), 50, replace=TRUE, prob=c(25/50,
        25/50))<br>
        > table(T) <br>
        T<br>
         0  1 <br>
        22 28 <br>
        <br>
        > set.seed(12345)<br>
        > T <- sample(c(0,1), 50, replace=TRUE, prob=c(25/50,
        25/50))<br>
        > table(T)<br>
        T<br>
         0  1 <br>
        23 27 <br>
        <div><br>
          > set.seed(123)<br>
          > T <- sample(c(0,1), 50, replace=TRUE, prob=c(25/50,
          25/50))<br>
          > table(T)<br>
          T<br>
           0  1 <br>
          25 25 <br>
          <br>
          > set.seed(2)<br>
          > T <- sample(c(0,1), 50, replace=TRUE, prob=c(25/50,
          25/50))<br>
          > table(T)<br>
          T<br>
           0  1 <br>
          25 25<br>
          <br>
        </div>
        <div><br>
        </div>
        <div>-- <br>
          <div style="font-family:Calibri,sans-serif;font-size:16px"><font
              face="Verdana"><span
                style="font-family:arial;font-size:10pt">\begin{signature}</span><br
                style="font-family:arial;font-size:small">
              <span style="font-family:arial;font-size:10pt">Daniel
                Marcelino</span><br
                style="font-family:arial;font-size:small">
              <span style="font-family:arial;font-size:10pt">☁ </span><a
                moz-do-not-send="true"
                href="mailto:dm.silva@umontreal.ca"
                style="font-family:arial;font-size:small"
                target="_blank">dm.silva@umontreal.ca</a><span
                style="font-family:arial;font-size:10pt"> </span><br
                style="font-family:arial;font-size:small">
              <span style="font-family:arial;font-size:10pt">☎ (514) 343
                6111 #3799</span></font></div>
          <div style="font-family:Calibri,sans-serif;font-size:16px"><font
              face="Verdana"><span
                style="font-family:arial;font-size:13px">Skype:
                d.marcelino </span></font></div>
          <div style="font-family:Calibri,sans-serif;font-size:16px"><font
              face="Verdana"><span
                style="font-family:arial;font-size:10pt">✎ 3200 Jean
                Brillant,  Office C5071</span><br
                style="font-family:arial;font-size:small">
              <span style="font-family:arial;font-size:10pt">Montreal,
                QC; H3T 1N8</span><br
                style="font-family:arial;font-size:small">
              <span style="font-family:arial;font-size:10pt">Canada</span><br
                style="font-family:arial;font-size:small">
              <span style="font-family:arial;font-size:10pt">\end{signature}</span></font></div>
          <div style="font-family:Calibri,sans-serif;font-size:16px">
            <font face="Verdana"><span
                style="font-family:arial;font-size:13px"><br>
              </span></font></div>
          <div style="font-family:Calibri,sans-serif;font-size:16px"><font
              face="Verdana"><span
                style="font-family:arial;font-size:13px">"Small steps
                toward a much better world"</span></font></div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
R-br mailing list
<a class="moz-txt-link-abbreviated" href="mailto:R-br@listas.c3sl.ufpr.br">R-br@listas.c3sl.ufpr.br</a>
<a class="moz-txt-link-freetext" href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br">https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br</a>
Leia o guia de postagem (<a class="moz-txt-link-freetext" href="http://www.leg.ufpr.br/r-br-guia">http://www.leg.ufpr.br/r-br-guia</a>) e forneça código mínimo reproduzível.</pre>
    </blockquote>
    <br>
  </body>
</html>