Exactly, that's why using combinatorial analysis is not advisable in this type of problems. Not to mention the use of factorials.
A long simulation is much more reliable. Let me give you an example...
Ken Uston had a huge drug problem. Most of the money he made went to cocaine. He died young, either from a drug overdose or a heart attack from the years of drug abuse.
So my code returns 0.0625 which is blatantly incorrect :) as the correct number is 0.3125 if we do exactly 2 consecutive heads or 0.5 if we do 2 or more consecutive heads (3 or 4 in this case). My...
I apologize, I may have formulated the problem incorrectly. What I meant to ask is:
What is the probability of getting 2 or more consecutive heads in 4 tosses of a fair coin (p = 0.5)?
I'm just...
Exactly 2 or more than 2. Exactly the same of getting 2 or more tails. Regardless, the Law of Small Numbers should apply. Notwithstanding semantics, seems to me the probability is dependant on...
Hi iCountNTrack,
Could you check with your code what is the probability of getting 2 heads with a probability of 0.5 in 4 coin tosses? Thanks.
Sincerely,
Cac
read about stu ungar but cannot find anything about ken uston where it says he failed. every article and video shares his skills and succesfull stories.
This is my implementation.
#include <iostream>
#include <vector>
#include <cmath>
long long binomialCoefficient(int n, int k) {
std::vector<long long> dp(k + 1, 0);
dp = 1;
No, I used the same model that I used for the coin toss, but obviously with the corresponding probabilities. I added the probability of a tie to the probability of winning.
You can also check those...
I have learned to control variance at halves. Involves combination of high win rate coordinated with reducing $win per session and reducing by a further % reduction in $loss rate. Results really are...