<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Probability and statistics blog &#187; beta distribution</title>
	<atom:link href="http://www.statisticsblog.com/tag/beta-distribution/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.statisticsblog.com</link>
	<description>In Monte Carlo We Trust</description>
	<lastBuildDate>Mon, 16 Jan 2012 01:30:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Weekend art in R (part 1?)</title>
		<link>http://www.statisticsblog.com/2010/05/weekend-art-in-r-part-1/</link>
		<comments>http://www.statisticsblog.com/2010/05/weekend-art-in-r-part-1/#comments</comments>
		<pubDate>Sat, 29 May 2010 18:01:01 +0000</pubDate>
		<dc:creator>Matt Asher</dc:creator>
				<category><![CDATA[art]]></category>
		<category><![CDATA[r]]></category>
		<category><![CDATA[beta distribution]]></category>

		<guid isPermaLink="false">http://www.statisticsblog.com/?p=190</guid>
		<description><![CDATA[As usual click on the image for a full-size version. Code: par&#40;bg=&#34;black&#34;&#41; par&#40;mar=c&#40;0,0,0,0&#41;&#41; plot&#40;c&#40;0,1&#41;,c&#40;0,1&#41;,col=&#34;white&#34;,pch=&#34;.&#34;,xlim=c&#40;0,1&#41;,ylim=c&#40;0,1&#41;&#41; iters = 500 for&#40;i in 1:iters&#41; &#123; center = runif&#40;2&#41; size = rbeta&#40;2,1,50&#41; &#160; # Let's create random HTML-style colors color = sample&#40;c&#40;0:9,&#34;A&#34;,&#34;B&#34;,&#34;C&#34;,&#34;D&#34;,&#34;E&#34;,&#34;F&#34;&#41;,12,replace=T&#41; fill = paste&#40;&#34;#&#34;, paste&#40;color&#91;1:6&#93;,collapse=&#34;&#34;&#41;,sep=&#34;&#34;&#41; brdr = paste&#40;&#34;#&#34;, paste&#40;color&#91;7:12&#93;,collapse=&#34;&#34;&#41;,sep=&#34;&#34;&#41; &#160; rect&#40;center&#91;1&#93;-size&#91;1&#93;, center&#91;2&#93;-size&#91;2&#93;, center&#91;1&#93;+size&#91;1&#93;, center&#91;2&#93;+size&#91;2&#93;, col=fill, border=brdr, density=NA, lwd=1.5&#41; &#125;]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.statisticsblog.com/wp-content/uploads/2010/05/Art1.png"><img class="alignnone size-full wp-image-191" title="Art1" src="http://www.statisticsblog.com/wp-content/uploads/2010/05/Art1.png" alt="" width="500" height="462" /></a><br />
As usual click on the image for a full-size version. Code:</p>

<div class="wp_syntax"><div class="code"><pre class="rsplus" style="font-family:monospace;"><span style="color: #0000FF; font-weight: bold;">par</span><span style="color: #080;">&#40;</span>bg<span style="color: #080;">=</span><span style="color: #ff0000;">&quot;black&quot;</span><span style="color: #080;">&#41;</span>
<span style="color: #0000FF; font-weight: bold;">par</span><span style="color: #080;">&#40;</span>mar<span style="color: #080;">=</span><span style="color: #0000FF; font-weight: bold;">c</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">0</span>,<span style="color: #ff0000;">0</span>,<span style="color: #ff0000;">0</span>,<span style="color: #ff0000;">0</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span>
<span style="color: #0000FF; font-weight: bold;">plot</span><span style="color: #080;">&#40;</span><span style="color: #0000FF; font-weight: bold;">c</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">0</span>,<span style="color: #ff0000;">1</span><span style="color: #080;">&#41;</span>,<span style="color: #0000FF; font-weight: bold;">c</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">0</span>,<span style="color: #ff0000;">1</span><span style="color: #080;">&#41;</span>,<span style="color: #0000FF; font-weight: bold;">col</span><span style="color: #080;">=</span><span style="color: #ff0000;">&quot;white&quot;</span>,pch<span style="color: #080;">=</span><span style="color: #ff0000;">&quot;.&quot;</span>,xlim<span style="color: #080;">=</span><span style="color: #0000FF; font-weight: bold;">c</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">0</span>,<span style="color: #ff0000;">1</span><span style="color: #080;">&#41;</span>,ylim<span style="color: #080;">=</span><span style="color: #0000FF; font-weight: bold;">c</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">0</span>,<span style="color: #ff0000;">1</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span>
iters <span style="color: #080;">=</span> <span style="color: #ff0000;">500</span>
<span style="color: #0000FF; font-weight: bold;">for</span><span style="color: #080;">&#40;</span>i <span style="color: #0000FF; font-weight: bold;">in</span> <span style="color: #ff0000;">1</span><span style="color: #080;">:</span>iters<span style="color: #080;">&#41;</span> <span style="color: #080;">&#123;</span>
	center <span style="color: #080;">=</span> <span style="color: #0000FF; font-weight: bold;">runif</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">2</span><span style="color: #080;">&#41;</span>
	size <span style="color: #080;">=</span> <span style="color: #0000FF; font-weight: bold;">rbeta</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">2</span>,<span style="color: #ff0000;">1</span>,<span style="color: #ff0000;">50</span><span style="color: #080;">&#41;</span>
&nbsp;
	<span style="color: #228B22;"># Let's create random HTML-style colors</span>
	color <span style="color: #080;">=</span> <span style="color: #0000FF; font-weight: bold;">sample</span><span style="color: #080;">&#40;</span><span style="color: #0000FF; font-weight: bold;">c</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">0</span><span style="color: #080;">:</span><span style="color: #ff0000;">9</span>,<span style="color: #ff0000;">&quot;A&quot;</span>,<span style="color: #ff0000;">&quot;B&quot;</span>,<span style="color: #ff0000;">&quot;C&quot;</span>,<span style="color: #ff0000;">&quot;D&quot;</span>,<span style="color: #ff0000;">&quot;E&quot;</span>,<span style="color: #ff0000;">&quot;F&quot;</span><span style="color: #080;">&#41;</span>,<span style="color: #ff0000;">12</span>,<span style="color: #0000FF; font-weight: bold;">replace</span><span style="color: #080;">=</span><span style="color: #0000FF; font-weight: bold;">T</span><span style="color: #080;">&#41;</span>
	fill <span style="color: #080;">=</span> <span style="color: #0000FF; font-weight: bold;">paste</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">&quot;#&quot;</span>, <span style="color: #0000FF; font-weight: bold;">paste</span><span style="color: #080;">&#40;</span>color<span style="color: #080;">&#91;</span><span style="color: #ff0000;">1</span><span style="color: #080;">:</span><span style="color: #ff0000;">6</span><span style="color: #080;">&#93;</span>,collapse<span style="color: #080;">=</span><span style="color: #ff0000;">&quot;&quot;</span><span style="color: #080;">&#41;</span>,sep<span style="color: #080;">=</span><span style="color: #ff0000;">&quot;&quot;</span><span style="color: #080;">&#41;</span>
	brdr <span style="color: #080;">=</span> <span style="color: #0000FF; font-weight: bold;">paste</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">&quot;#&quot;</span>, <span style="color: #0000FF; font-weight: bold;">paste</span><span style="color: #080;">&#40;</span>color<span style="color: #080;">&#91;</span><span style="color: #ff0000;">7</span><span style="color: #080;">:</span><span style="color: #ff0000;">12</span><span style="color: #080;">&#93;</span>,collapse<span style="color: #080;">=</span><span style="color: #ff0000;">&quot;&quot;</span><span style="color: #080;">&#41;</span>,sep<span style="color: #080;">=</span><span style="color: #ff0000;">&quot;&quot;</span><span style="color: #080;">&#41;</span>
&nbsp;
	<span style="color: #0000FF; font-weight: bold;">rect</span><span style="color: #080;">&#40;</span>center<span style="color: #080;">&#91;</span><span style="color: #ff0000;">1</span><span style="color: #080;">&#93;</span><span style="color: #080;">-</span>size<span style="color: #080;">&#91;</span><span style="color: #ff0000;">1</span><span style="color: #080;">&#93;</span>, center<span style="color: #080;">&#91;</span><span style="color: #ff0000;">2</span><span style="color: #080;">&#93;</span><span style="color: #080;">-</span>size<span style="color: #080;">&#91;</span><span style="color: #ff0000;">2</span><span style="color: #080;">&#93;</span>, center<span style="color: #080;">&#91;</span><span style="color: #ff0000;">1</span><span style="color: #080;">&#93;</span><span style="color: #080;">+</span>size<span style="color: #080;">&#91;</span><span style="color: #ff0000;">1</span><span style="color: #080;">&#93;</span>, center<span style="color: #080;">&#91;</span><span style="color: #ff0000;">2</span><span style="color: #080;">&#93;</span><span style="color: #080;">+</span>size<span style="color: #080;">&#91;</span><span style="color: #ff0000;">2</span><span style="color: #080;">&#93;</span>, <span style="color: #0000FF; font-weight: bold;">col</span><span style="color: #080;">=</span>fill, border<span style="color: #080;">=</span>brdr, <span style="color: #0000FF; font-weight: bold;">density</span><span style="color: #080;">=</span>NA, lwd<span style="color: #080;">=</span><span style="color: #ff0000;">1.5</span><span style="color: #080;">&#41;</span>
<span style="color: #080;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.statisticsblog.com/2010/05/weekend-art-in-r-part-1/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

