Statistics
Generate a fair coin from a biased one.
Data Scientist
Spotify
Microsoft
Honeywell
Cleo
Soundcloud
Segment
Answers
Anonymous
9 months ago
Suppose the probability of Tail is p and Head is (1-p). Adjust the weight of each Tail to be 1/2p and Head to be 1/2(1-p). Every time a Tail tossed is counted as 1/2p Tail, every time a Head tossed is counted as 1/2(1-p) Head.
In this case, the probability of tossing a Head will be 1/2, same as a Tail.
Try Free AI Interview
Interview question asked to Data Scientists interviewing at Segment, Honeywell, Yelp and others: Generate a fair coin from a biased one..