LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 829
Default Need help calculating probabilities

PS.... I wrote:
To do __exactly__ as you describe, I would create a Worksheet_Calculate
event macro to update the counts in D1:D5.


Although that is what I would do based on your design and solution
limitations, I can offer one alternative that does not require a macro.

However, I do not recommend it.

This solution requires the use of one extra cell. I use F1, which is
initially empty.

Then enter the following formulas:

C3: =IF(F1="","",(C1-C2)*2/(C1+C2))
D1: =IF(C3="",0,D1+(C3=0.4))
D2: =IF(C3="",0,D2+(0.2<=C3)*(C3<0.4))
D3: =IF(C3="",0,D3+(-0.2<C3)*(C3<0.2))
D4: =IF(C3="",0,D4+(-0.4<C3)*(C3<=-0.2))
D5: =IF(C3="",0,D5+(C3<=-0.4))

Set the Iterative calculation option with Max Iterations set to 1.

When you are ready to start your experiment, set F1 to 1. That is the first
recalculations. Press F9 successively for subsequent recalculations.

Clear F1 to start the counters at zero again.

To set the Iterative calculation option:

1. In Excel 2003, click on Tools, Options, Calculation.
2. In Excel 2007, click on the Office Button, Excel Options, Formulas.
3. In Excel 2010, click on File, Options, Formulas.

Caveat: I deprecate the use of the Iterative calculation option for two
reasons. First, it is unreliable in some situations, although it is
probably reliable in this limited usage. Second, it masks mistaken circular
references; that is, you will not get an error message.

But again, I would do this experiment very differently altogether, not
relying on either a Calculate event macro or the iterative calculation
option.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculating probabilities Raul Sousa Excel Worksheet Functions 9 October 19th 09 06:44 PM
Calculating Probabilities Daisy Excel Worksheet Functions 3 March 3rd 08 08:01 PM
Question about use of Poisson probabilities Dora Smith Excel Worksheet Functions 1 February 4th 07 07:09 PM
Probabilities phil2006[_30_] Excel Programming 2 July 22nd 06 05:05 PM
Macro and probabilities MrKermit Excel Programming 2 March 31st 06 10:01 AM


All times are GMT +1. The time now is 03:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"