title: Using Bootstrapping for Confidence Intervals for Proportions - Matlab
body: <p>I have a simple nx1 array of integers and I'd like to bootstrapping it for evaluate the confidence intervals of the proportions.</p>
  
  <p>I've found a solution for IBM SPSS, but i'd like to do this analysis with matlab, you can find here  the example:
  <a href="http://publib.boulder.ibm.com/infocenter/spssstat/v20r0m0/index.jsp?topic=%2Fcom.ibm.spss.statistics.cs%2Fbootstrap_telco_frequencies_table.htm" rel="nofollow">http://publib.boulder.ibm.com/infocenter/spssstat/v20r0m0/index.jsp?topic=%2Fcom.ibm.spss.statistics.cs%2Fbootstrap_telco_frequencies_table.htm</a></p>
  
  <p>in Matlab I have this data, and it's from tabulation of array called <strong>c</strong>:</p>
  
  <pre><code> Value | Count | Percent
    1      300      2.99%
    2     2928     29.16%
    3        0      0.00%
    4     3244     32.31%
    5        0      0.00%
    6     2589     25.78%
    7      980      9.76%
  </code></pre>
  
  <p>And I've tried to use as BOOTFUN for the bootstrap confidence interval, the following expression:</p>
  
  <pre><code>n = histc(c,unique(c))/sum(n);
  </code></pre>
  
  <p>I mean for <strong>n</strong> the proportions of the previous array.</p>
  
  <p>Finally I use the bootci function for evaluate the intervals:</p>
  
  <pre><code>ci= bootci(1000,n,c);
  </code></pre>
  
  <p>I know I'm wrong in the setup of bootfun but I don't know how to fix it, and for this reason I'd like to have your help. I hope the problem is clear enough.</p>