smide
Board Regular
- Joined
- Dec 20, 2015
- Messages
- 164
- Office Version
- 2016
- Platform
- Windows
Hello.
I'm using Solver optimisation to find mean in Poisson distribution (POISSON.DIST(x,mean,TRUE)), for expected probability which is known value.
In my case x is also fixed value, always equal to 2.
I carry out the following calculation process:
- in cell H3 there is a formula: =POISSON.DIST(2,I3,TRUE)
- in cell I3 there is (pre-Solver run) value of 1
- in cell J3 there is a known expected probability
- finally in cell K3 there is a difference (formula) =H3-J3
When I open my Solver window, my Set objective is cell $K$3, To: Value of 0 (zero), By Changing Variable Cells: $I$3.
So for example if I set my cell I3=1, J3=0.51 and run my Solver, result in cell I3 is 2.65.
I should repeat somehow this calculation solving process (loop - VBA) for each row from 3 to 1000.
example.
pre Solver
after Solver run
I'm using Solver optimisation to find mean in Poisson distribution (POISSON.DIST(x,mean,TRUE)), for expected probability which is known value.
In my case x is also fixed value, always equal to 2.
I carry out the following calculation process:
- in cell H3 there is a formula: =POISSON.DIST(2,I3,TRUE)
- in cell I3 there is (pre-Solver run) value of 1
- in cell J3 there is a known expected probability
- finally in cell K3 there is a difference (formula) =H3-J3
When I open my Solver window, my Set objective is cell $K$3, To: Value of 0 (zero), By Changing Variable Cells: $I$3.
So for example if I set my cell I3=1, J3=0.51 and run my Solver, result in cell I3 is 2.65.
I should repeat somehow this calculation solving process (loop - VBA) for each row from 3 to 1000.
example.
pre Solver
H | I | J | K | |
1 | ||||
2 | ||||
3 | 0.92 | 1.0 | 0.507 | 0.413 |
4 | 0.92 | 1.0 | 0.432 | 0.488 |
5 | 0.92 | 1.0 | 0.654 | 0.265 |
6 | ... | .... | .... | .... |
after Solver run
H | I | J | K | |
1 | ||||
2 | ||||
3 | 0.507 | 2.647 | 0.507 | 0 |
4 | 0.432 | 2.962 | 0.432 | 0 |
5 | 0.654 | 2.082 | 0.654 | 0 |
6 | ... | .... | .... | .... |