Are these two methods of generating coin tosses equivalent?

They are equivalent. I would expect the second to be faster, and it will cut memory by a factor of 4 since the same amount of memory is needed to store 1 bit integers as 4 bit integers (I think the smallest granularity supported, even by the relatively new integer types, is at least a byte).

As for the problem at hand, you’d check the ratio of 12s to 15s I guess.

As for equivalence in principle, one can convert the second representation to the first using IntegerDigits[...,2,4] and the first to the second using FromDigits[...,2].

Daniel,

Thanks a ton for your response! The memory factor is the biggest for me since I am using an old laptop and/or WolframCloud on the “Personal” plan, both of which are highly constrained.

Converting between the two also makes sense.

-David

Thanks Martin! I am going to try this method
-David

I’m not so sure that the coin-tossing question as proposed by @MichaelHarrisNY is well-formulated. For example, the ratio is exactly 1 if HHHHH and HHTT comprise the first two sets of tosses. This happens with probability 1/128 (= 2*(1/16)^2).

The issue is what is meant by “converges”. A more well-defined proposal is maybe determining the mean number of sets of 4 tosses that first results in the ratio being between 0.99 and 1.01.

Jim,
Definitely some ambiguity in the question! I use it for more of a fun excuse to exercise my Wolfram language skills. With that in mind I chose to interpret it more broadly. Ended up learning a couple things and got to post this question to the community, which I always enjoy doing.
David