Probability Nothttp://probabilitynot.codeplex.com/project/feeds/rssHow often does an expected background fluctuate up to some number of events? Silverlight 3 program that graphically calculates this (gaussian background expectation, poisson sampling for # of events).Source code checked in, #76924http://probabilitynot.codeplex.com/SourceControl/changeset/changes/76924Upgrade: New Version of LabDefaultTemplate.xaml. To upgrade your build definitions, please visit the following link: http://go.microsoft.com/fwlink/?LinkId=254563Project Collection Service AccountsMon, 01 Oct 2012 21:29:18 GMTSource code checked in, #76924 20121001092918PSource code checked in, #76923http://probabilitynot.codeplex.com/SourceControl/changeset/changes/76923Checked in by server upgradeProject Collection Service AccountsMon, 01 Oct 2012 21:23:54 GMTSource code checked in, #76923 20121001092354PSource code checked in, #49966http://probabilitynot.codeplex.com/SourceControl/changeset/changes/49966Checked in by server upgrade_TFSSERVICEMon, 19 Jul 2010 20:19:27 GMTSource code checked in, #49966 20100719081927PSource code checked in, #45384http://probabilitynot.codeplex.com/SourceControl/changeset/changes/45384Minor updates, and better reference to one of the missing dll's.gwattsFri, 14 May 2010 23:53:09 GMTSource code checked in, #45384 20100514115309PSource code checked in, #44958http://probabilitynot.codeplex.com/SourceControl/changeset/changes/44958Added libraries for math.net numerics for SilverlightgwattsWed, 12 May 2010 06:33:19 GMTSource code checked in, #44958 20100512063319ASource code checked in, #44954http://probabilitynot.codeplex.com/SourceControl/changeset/changes/44954Updated to SL4.0 version of the data visualization toolkit.gwattsWed, 12 May 2010 06:00:49 GMTSource code checked in, #44954 20100512060049ASource code checked in, #44866http://probabilitynot.codeplex.com/SourceControl/changeset/changes/44866Refactoring to get ready for Ron's updates.gwattsTue, 11 May 2010 20:31:17 GMTSource code checked in, #44866 20100511083117PCreated Issue: Try background: 50, background width 15 [4626]http://probabilitynot.codeplex.com/WorkItem/View.aspx?WorkItemId=4626and see the carnage!<br />gwattsTue, 11 May 2010 20:31:17 GMTCreated Issue: Try background: 50, background width 15 [4626] 20100511083117PSource code checked in, #44852http://probabilitynot.codeplex.com/SourceControl/changeset/changes/44852Ops! Remove a dummy project we accidentally had in there!gwattsTue, 11 May 2010 19:41:12 GMTSource code checked in, #44852 20100511074112PSource code checked in, #44851http://probabilitynot.codeplex.com/SourceControl/changeset/changes/44851Minor changes (comments) and upgrades to get it working with 2010 final and RC2 of the sliver light 4 sdk and the April 2010 release of the SL toolkit.gwattsTue, 11 May 2010 19:40:41 GMTSource code checked in, #44851 20100511074041PSource code checked in, #42183http://probabilitynot.codeplex.com/SourceControl/changeset/changes/42183Simple program to test the Math.NET Numerics library.gwattsFri, 23 Apr 2010 23:24:20 GMTSource code checked in, #42183 20100423112420PClosed Issue: 1.e-5 background width gives the wrong answer [3628]http://probabilitynot.codeplex.com/WorkItem/View.aspx?WorkItemId=3628Enter 1.0e-5 as a background width, and 0.1 expected - you should see about 10% for 1 event. But you see zero!?<br />Comments: <p>Checked with release</p>gwattsTue, 29 Dec 2009 22:08:14 GMTClosed Issue: 1.e-5 background width gives the wrong answer [3628] 20091229100814PCreated Issue: 1.e-5 background width gives the wrong answer [3628]http://probabilitynot.codeplex.com/WorkItem/View.aspx?WorkItemId=3628Enter 1.0e-5 as a background width, and 0.1 expected - you should see about 10% for 1 event. But you see zero!?<br />gwattsTue, 29 Dec 2009 22:07:56 GMTCreated Issue: 1.e-5 background width gives the wrong answer [3628] 20091229100756PCreated Release: Probability Not v1.01 (Dec 29, 2009)http://probabilitynot.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=37937<div class="wikidoc">Simple tool to calculate poisson probability of observing some number of events given a gaussian background. Written in Silverlight, with interactive plots. Fixes dealing with very small background widths (like 1.0e-5). Fix is a bit of a kludge, see the "?" for further info.<br /><br />Load it here: <a href="http://d0.phys.washington.edu/~gwatts/prob" class="externalLink">http://d0.phys.washington.edu/~gwatts/prob<span class="externalLinkIcon"></span></a></div><div class="ClearBoth"></div>gwattsTue, 29 Dec 2009 22:06:06 GMTCreated Release: Probability Not v1.01 (Dec 29, 2009) 20091229100606PReleased: Probability Not v1.01 (Dec 29, 2009)http://probabilitynot.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=37937<div>Simple tool to calculate poisson probability of observing some number of events given a gaussian background. Written in Silverlight, with interactive plots. Fixes dealing with very small background widths (like 1.0e-5). Fix is a bit of a kludge, see the "?" for further info.<br><br>Load it here: <a href="http://d0.phys.washington.edu/~gwatts/prob">http://d0.phys.washington.edu/~gwatts/prob<span></span></a></div><div></div>Tue, 29 Dec 2009 22:06:06 GMTReleased: Probability Not v1.01 (Dec 29, 2009) 20091229100606PSource code checked in, #33786http://probabilitynot.codeplex.com/SourceControl/changeset/view/33786Fixing up 1e-5 dealing with that!gwattsTue, 29 Dec 2009 22:04:33 GMTSource code checked in, #33786 20091229100433PSource code checked in, #33785http://probabilitynot.codeplex.com/SourceControl/changeset/view/33785Fix up dealing with 1e-5 widths.gwattsTue, 29 Dec 2009 22:02:44 GMTSource code checked in, #33785 20091229100244PUpdated Wiki: Documentationhttp://probabilitynot.codeplex.com/documentation?version=7<div class="wikidoc"><h1>Usage</h1>
For first time usage, point your web browser at <a href="http://d0.phys.washington.edu/~gwatts/prob" class="externalLink">http://d0.phys.washington.edu/~gwatts/prob<span class="externalLinkIcon"></span></a>. Once the <i>Probability Not</i> application has loaded enter the expected background and its width (it is always taken to be a gaussian). The gaussian and poisson distrubtions will appear representing those numbers. You can then enter the # of events or the probability (or even grab the slider next to the probability entry box). The program will fill in the one you didn't. It will also shade the plots to show the area represented by the probability.<br /><br /><img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=ProbabilityNot&DownloadId=99031" alt="demo.png" title="demo.png" /><br /><br />If you wish, you can install <i>Probability Not</i> localy by right-clicking on the application and selecting "Install onto this computer...". In that case, just in case I do actually update it, you might click the tiny tiny "update" button in the lower left hand corner (control-click on a Mac).<br />
<h1>Warnings</h1>
Two warnings I can think of... I'm sure there are more. :-)<br />
<ul><li>Currently this is using a very crude form of area-under-a-curve integration to calculate the probability. This is bad, and not accurate! I will upgrade to a real math library now that I sort-of know what I'm doing with Silverlight.</li>
<li>There is a random number generator and trials involved in this calculation (see below). As a result, you can expect repeated answers to not be exact. The trials are only thrown if you alter the # of expected background events or the expected background's width.</li>
<li>If you put in a very large wdith (say 1e5) it will appear the program has hung. This isn't what has happened, however, it will take a very long time to do the calculation, and it is being done on the main thread and that causes a hang - so just wait, or kill it and try again. :-)</li>
<li>Very small guassian widths on the expected background are not well delt with - so the answer will either come out almost right or it will come out zero... depending on how the randome number generator works. When I use a real math library this will get fixed.</li></ul>
<h1>The Calculation</h1>
The calculation is actually dirt simple, and contains a number of things that make the number that comes out slightly untrustworthy.<br />
<ol><li>A gaussian with mean and width of the specified expected background value and width is created. It is normalized to one (it could be truncated at zero - no negative probability is allowed here).</li>
<li>A crude calculation is performed to determine the xmin and xmax of the plot.</li>
<li>The length of the axis is sampled uniformly 1000 times, and the guassian function gives an exact weight for each sample.</li>
<li>The Poisson distribution for the expected background is created and weighted by the gaussian weight.</li>
<li>The ~2000 Poisson distributions are then added up (and re-normalized in order to deal with the truncated plot).</li></ol>
<br />The actual number of trials is about 20 times the number of bins. The code does its best to make sure there are atleast 50 bins under the main part of the Gaussian, but for performance reasons limits itself to a total of 2000 bins for the full axis.<br /><br />This is how the two curves are generated. Calculating the probability is done with simple interpolation. The Poisson distribution is really not continuous, so I use a sample interpolation (assuming P(1) is the same value from 1.0 -> 2.0).<br /><br /></div><div class="ClearBoth"></div>gwattsTue, 29 Dec 2009 22:01:11 GMTUpdated Wiki: Documentation 20091229100111PUpdated Wiki: Documentationhttp://probabilitynot.codeplex.com/documentation?version=6<div class="wikidoc"><h1>Usage</h1>
For first time usage, point your web browser at <a href="http://d0.phys.washington.edu/~gwatts/prob" class="externalLink">http://d0.phys.washington.edu/~gwatts/prob<span class="externalLinkIcon"></span></a>. Once the <i>Probability Not</i> application has loaded enter the expected background and its width (it is always taken to be a gaussian). The gaussian and poisson distrubtions will appear representing those numbers. You can then enter the # of events or the probability (or even grab the slider next to the probability entry box). The program will fill in the one you didn't. It will also shade the plots to show the area represented by the probability.<br /><br /><img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=ProbabilityNot&DownloadId=99031" alt="demo.png" title="demo.png" /><br /><br />If you wish, you can install <i>Probability Not</i> localy by right-clicking on the application and selecting "Install onto this computer...". In that case, just in case I do actually update it, you might click the tiny tiny "update" button in the lower left hand corner (control-click on a Mac).<br />
<h1>Warnings</h1>
Two warnings I can think of... I'm sure there are more. :-)<br />
<ul><li>Currently this is using a very crude form of area-under-a-curve integration to calculate the probability. This is bad, and not accurate! I will upgrade to a real math library now that I sort-of know what I'm doing with Silverlight.</li>
<li>There is a random number generator and trials involved in this calculation (see below). As a result, you can expect repeated answers to not be exact. The trials are only thrown if you alter the # of expected background events or the expected background's width.</li>
<li>If you put in a very large wdith (say 1e5) it will appear the program has hung. This isn't what has happened, however, it will take a very long time to do the calculation, and it is being done on the main thread and that causes a hang - so just wait, or kill it and try again. :-)</li>
<li>Very small guassian widths on the expected background are not well delt with - so the answer will either come out almost right or it will come out zero... depending on how the randome number generator works. When I use a real math library this will get fixed.</li></ul>
<h1>The Calculation</h1>
The calculation is actually dirt simple, and contains a number of things that make the number that comes out slightly untrustworthy.<br />
<ol><li>A gaussian with mean and width of the specified expected background value and width is created. It is normalized to one (it could be truncated at zero - no negative probability is allowed here).</li>
<li>A crude calculation is performed to determine the xmin and xmax of the plot.</li>
<li>The length of the axis is sampled uniformly 1000 times, and the guassian function gives an exact weight for each sample.</li>
<li>The Poisson distribution for the expected background is created and weighted by the gaussian weight.</li>
<li>The ~2000 Poisson distributions are then added up (and re-normalized in order to deal with the truncated plot).</li></ol>
<ul><li>The actual number of trials is about 20 times the number of bins. The code does its best to make sure there are atleast 50 bins under the main part of the Gaussian, but for performance reasons limits itself to a total of 2000 bins for the full axis.</li></ul>
<br />This is how the two curves are generated. Calculating the probability is done with simple interpolation. The Poisson distribution is really not continuous, so I use a sample interpolation (assuming P(1) is the same value from 1.0 -> 2.0).<br /><br /></div><div class="ClearBoth"></div>gwattsTue, 29 Dec 2009 22:00:28 GMTUpdated Wiki: Documentation 20091229100028PCreated Issue: Make sure very very small widths work correctly [3627]http://probabilitynot.codeplex.com/WorkItem/View.aspx?WorkItemId=3627Small widths (like 1e-5) can cause some difficulties - make sure they work right and give the right answer.<br />gwattsTue, 29 Dec 2009 21:56:26 GMTCreated Issue: Make sure very very small widths work correctly [3627] 20091229095626P