Ignore for my little knowledge in Mathematical Terminology I need help in figuring out and verifying following things.
- Lets say I have a function(fA) which returns an object of 1 Type-1 ( lets assume 0 ) amd another function fB which returns object of Type-2 ( lets assume 1 )
Now i am generating a sequence of atmost N objects, ONE BY ONE either fA or fB
and now i am seeking help on how to ensure that Generated Sequence contains 1 with some probability.
example if even number probability is 70% ( at least 70% of number in sequence are 1 ) 2 Length Sequence : {0,1} or {1,0} 3 Length Sequence : {0,1,1} or {1,1,0} or {1,0,1}
I am thinking of , calling fA, fB with required probabliity with 70% on first invocation, and then on second invocation fA,fB probability will change from 70 via bayes rule of probability. but need some guidance on how to calculate that.
P ( 2nd Invocation | 1st Invocation ) = P( 1st invocation | 2nd Invocation ) . P ( 2nd Invocation ) / P ( 1st Invocation )
need help in figuring out P ( 1st Invocation | 2nd Invocation ) ,
Not sure if i am on right path, Seeking help on which particular area of probability i should explore more to validate