WOLFRAM LANGUAGE FEATURED EXAMPLE

Coin Flip Sequences

When flipping an unbiased coin, on average it takes longer for HHT to occur than for HTT, even though the sequence probabilities are equal.

    
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
Find the mean number of coin flips to reach HHT:
In[3]:=
Click for copyable input
Out[3]=
Find the mean number of coin flips to reach HTT:
In[4]:=
Click for copyable input
Out[4]=