Well, he said:
Quote:
quote:
can someone please tell me how i can get my computer to create a finate sequence of coin tosses.
|
and
Quote:
quote:
i want to tell it p(heads)=1/3
p(tails)=2/3
|
To me, that means that we are telling the program that the probability of heads is 1/3, and we want to simulate a number of coin tosses.
If we want to know the probability that a fair coin gives the exact sequence that he gave (H, T, T, H, H, T, H, T, T, T), then we don't need a computer program, we know the answer is 1/2 to the power 10.
If we want to know the probability that a fair coin gives exactly four heads out of any 10 tosses (like his example sequence), we apply what we know about permutations; we don't need a computer program to generate a sequence of numbers.
The original post said he wanted to generate a finite sequence of coin tosses and he wants to tell it p(heads). I claim that my scheme does this.
Since the original poster has not responded, I can't know any more about his problem, and it's senseless for us to argue about what we think he meant.
Best regards,
Dave