# Red and Blue Marbles

Question: You have 50 red marbles, 50 blue marbles and 2 jars. One of the jars is chosen at random and then one marble will be chosen from that jar at random. How would you maximize the chance of drawing a red marble? What is the probability of doing so? All 100 marbles should be […]

# The Ant Problem

Question: Three ants are sitting at the three corners of an equilateral triangle. Each ant starts randomly picks a direction and starts to move along the edge of the triangle. What is the probability that none of the ants collide? Answer: So let’s think this through. The ants can only avoid a collision if they […]

# Pick a Random Byte

Question: You have a stream of bytes from which you can read one byte at a time. You only have enough space to store one byte. After processing those bytes, you have to return a random byte. Note: The probability of picking any one of those bytes should be equal. Answer: Since we can only store […]

# Boys and Girls

Question: In a country where everyone wants a boy, each family continues having babies till they have a boy. After some time, what is the proportion of boys to girls in the country? (Assuming probability of having a boy or a girl is the same) Answer: This is a very simple probability question in a […]

# Probability of a Car Passing By

Question: The probability of a car passing a certain intersection in a 20 minute windows is 0.9. What is the probability of a car passing the intersection in a 5 minute window? (Assuming a constant probability throughout) Answer: This is one of the basic probability question asked in a software interview. Let’s start by creating an […]
{"ft_lang_label":"__label__en","ft_lang_prob":0.939523,"math_prob":0.86385083,"size":284,"snap":"2020-45-2020-50","text_gpt3_token_len":69,"char_repetition_ratio":0.14642857,"word_repetition_ratio":0.0,"special_character_ratio":0.2535211,"punctuation_ratio":0.09836066,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99533606,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-11-24T14:27:35Z\",\"WARC-Record-ID\":\"<urn:uuid:d636a188-1ef4-4a50-b334-e890273ab222>\",\"Content-Length\":\"25294\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:f457c31c-c75d-469f-86f5-39780c5576d3>\",\"WARC-Concurrent-To\":\"<urn:uuid:88a2a2d5-365b-4f76-acb1-4c8bac8becf4>\",\"WARC-IP-Address\":\"34.198.120.227\",\"WARC-Target-URI\":\"http://www.mytechinterviews.com/category/probability\",\"WARC-Payload-Digest\":\"sha1:WIRO2AGJZGFO6IRUHTFJ7GSEFD3NV7I2\",\"WARC-Block-Digest\":\"sha1:PV4KUMBKJNE35L3WTZYKLHQKGT57LVAB\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-50/CC-MAIN-2020-50_segments_1606141176864.5_warc_CC-MAIN-20201124140942-20201124170942-00660.warc.gz\"}"}