text
stringlengths
301
426
source
stringclasses
3 values
__index_level_0__
int64
0
404k
Privacy, Vacation, Rental, Hidden Camera, Advocate. the camera pointing inside to see what is going on inside. We are not bothering anybody, and no music is being played. Owner: This is our house and our property. We are allowed to have cameras. We have them because we have too many people who have parties and don’t follow the rules. That may be
medium
102
Privacy, Vacation, Rental, Hidden Camera, Advocate. true. But was the owner following the rules? Rojas didn’t think so. “The next day, we called Vrbo,” she says. “They asked us for videos, images and texts from the owner. We sent them all the evidence.” Rojas says she wasn’t comfortable staying in the rental a second night. “We felt intimidated by
medium
103
Privacy, Vacation, Rental, Hidden Camera, Advocate. the surveillance camera, by the owner with her texts, by the false accusations. She ruined our stay there and our end of the year,” she says. So she and her husband left. Can she get a refund for having cameras in her vacation rental? Rojas wanted a refund for the second night. So she asked Vrbo.
medium
104
Privacy, Vacation, Rental, Hidden Camera, Advocate. “Vrbo sent me an email that said we should contact the owner directly to request the refund,” she says. “I contacted the owner and she refused to refund the second night.” Rojas circled back with Vrbo. This time, she asked it to refund both nights. Vrbo’s response, according to the paper trail she
medium
105
Privacy, Vacation, Rental, Hidden Camera, Advocate. provided, was to “validate” her complaint, but it offered no money back. (Related: “Such a bizarre” rental experience on Vrbo — but do they even care?) “Was our privacy violated while we were there?” she asked me. “Do we have the right to have our money refunded?” The short answer is: Yes. When
medium
106
Privacy, Vacation, Rental, Hidden Camera, Advocate. someone violates Vrbo’s camera policy, you get all of your money back. But did Heather, the owner of the lake house in Montgomery, violate Rojas’ privacy? (Here’s our guide to renting a vacation home.) Maybe. Privacy laws vary by location. But in the United States, the Fourth Amendment protects
medium
107
Privacy, Vacation, Rental, Hidden Camera, Advocate. citizens from unreasonable searches and seizures by the government, and that protection extends to temporary rentals. In addition, both Airbnb and Vrbo have privacy policies (I’ll get into them in a minute) that appear to partially protect guests like Rojas. The real question is, does an exterior
medium
108
Privacy, Vacation, Rental, Hidden Camera, Advocate. camera pointing at a door that could see inside a house constitute a violation of Vrbo’s rules? Let’s find out. Do Airbnb and Vrbo rentals allow surveillance cameras? Short answer: Inside, no. Outside, maybe. Neither Airbnb nor Vrbo allows cameras inside a rental. Airbnb ​​allows hosts to have
medium
109
Privacy, Vacation, Rental, Hidden Camera, Advocate. outdoor security cameras and recording devices. But hosts must disclose their locations in the listing. For example, “I have a camera in my front yard,” “I have a camera over my patio,” or “I have a camera over my pool.” Airbnb tightened its security camera policy in April. (It announced this
medium
110
Privacy, Vacation, Rental, Hidden Camera, Advocate. policy with great fanfare while I was advocating this case. More on the awkward timing in a minute.) Vrbo’s policy, which I’ve already mentioned, also doesn’t allow cameras inside a rental. But it does permit outdoor surveillance devices, including security cameras and smart doorbells, which may
medium
111
Privacy, Vacation, Rental, Hidden Camera, Advocate. record audio, but only under certain conditions. Owners have to disclose the location and coverage of devices on the property listing. They must also take “reasonable measures” to limit access to surveillance data. (Related: If the host tells you to leave, shouldn’t you get a refund?) The Vrbo
medium
112
Privacy, Vacation, Rental, Hidden Camera, Advocate. policy suggests that Heather, the owner of the lake house, was allowed to have a camera on the tree pointed at the house. But she was not allowed to use the camera to monitor the inside of the house — that’s where she crossed a line. If I find a surveillance camera in my vacation rental, what
medium
113
Privacy, Vacation, Rental, Hidden Camera, Advocate. should I do? If you find a hidden camera or spy cam in your vacation rental, that’s definitely a violation of your platform’s policies. And it happens more often than you would think. One in four travelers say they found a concealed camera in their vacation rental last year, according to a survey
medium
114
Privacy, Vacation, Rental, Hidden Camera, Advocate. by property investment firm IPX1031. Here’s how to handle a spy cam in your vacation rental: Don’t panic Maintain your composure and resist the urge to call your host to complain. Gather your thoughts. You’re going to be fine! Don’t touch the camera Avoid tampering with the camera. And whatever you
medium
115
Privacy, Vacation, Rental, Hidden Camera, Advocate. do, don’t remove it or disconnect it. You may need to take more pictures of the camera for evidence. Besides — it’s not your property. Document the surveillance Take clear photographs or videos of the camera, ensuring that any identifying features are visible. This evidence will be important if you
medium
116
Privacy, Vacation, Rental, Hidden Camera, Advocate. need to report the incident. Contact the platform This is one of those rare times when you’ll want to contact the platform first. Contact Airbnb or Vrbo and report the issue. Provide them with the documentation you’ve collected and follow their instructions. Leave the rental Don’t stay in a
medium
117
Privacy, Vacation, Rental, Hidden Camera, Advocate. vacation rental with a spy camera — or even an outside camera pointed at the house or apartment. You should find safe and private accommodations and leave as soon as possible. Can you sue a vacation rental owner for having a camera? Yes, if it’s in a bathroom or a bedroom, you might have a strong
medium
118
Privacy, Vacation, Rental, Hidden Camera, Advocate. case. But you might want to wait until you’ve received a refund from your platform before filing a lawsuit against the owner. If you think you might go the legal route, make sure you file a complaint with the local police department. Am I entitled to privacy in my vacation rental? Of course, you’re
medium
119
Privacy, Vacation, Rental, Hidden Camera, Advocate. entitled to privacy when you rent a vacation home or apartment. But how do you define privacy? On the subject of security cameras, there’s a patchwork of laws across the United States. For example: Georgia allows owners to use video surveillance cameras in public and private settings as long as the
medium
120
Privacy, Vacation, Rental, Hidden Camera, Advocate. cameras are in plain sight. Tennessee, Michigan, and Utah require a resident’s consent if you’re installing cameras in places that would be considered private, like a bedroom. In New Hampshire, Maine, Kansas, South Dakota, and Delaware, owners must apply the “reasonable expectation of privacy”
medium
121
Privacy, Vacation, Rental, Hidden Camera, Advocate. principle and require a tenant’s consent to use surveillance equipment. Although the word “privacy” never appears in the U.S. Constitution, legal experts say that the Fourth and Fifth Amendments grant citizens a right to privacy. Other countries have similar (but often equally vague) laws that
medium
122
Privacy, Vacation, Rental, Hidden Camera, Advocate. basically say you have a right to privacy in your own home. However, the law does not say you are entitled to a refund on your vacation rental if you find a camera or if your privacy has somehow been violated. That’s up to you to negotiate. Will she get a refund after her privacy was violated?
medium
123
Privacy, Vacation, Rental, Hidden Camera, Advocate. Vrbo’s response to Rojas was unacceptable. It regretted the “inconvenience” that the camera caused, but left her to negotiate with the defiant owner. And you can probably guess how that went. And the owner continued renting her Texas lake house while denying Rojas any refund. (Related: She left her
medium
124
Privacy, Vacation, Rental, Hidden Camera, Advocate. “unsafe” Vrbo rental. Can she get her money back?) By the end of January, Rojas had reached out to my advocacy team, and I had contacted Vrbo. Vrbo’s response? Silence. So a month later, I asked again. This time, a representative got back to me and said she had not received my original message. She
medium
125
Privacy, Vacation, Rental, Hidden Camera, Advocate. promised to look into the case. In mid-March, Airbnb changed its policy on hidden cameras. I received an email from one of Expedia’s publicists (Expedia owns Vrbo): Today, Airbnb announced updates to a policy that Vrbo has had in place since 2022 — prohibiting the presence of cameras inside
medium
126
Privacy, Vacation, Rental, Hidden Camera, Advocate. vacation rentals. Trust and safety are part of Vrbo’s legacy and are reflected in our policies against shared spaces, commitment to upfront pricing and the assurance provided by our Book with Confidence guarantee. We are glad to see our competitor on board with what we consider a base level of
medium
127
Privacy, Vacation, Rental, Hidden Camera, Advocate. privacy for customers. Plus, our policy goes a step further to prohibit any cameras that capture the inside of a property (whether they are indoors or outdoors.) Vrbo also requires disclosure of outdoor cameras, including additional disclosures if the outdoor cameras also capture pools. We embrace
medium
128
Privacy, Vacation, Rental, Hidden Camera, Advocate. all initiatives aimed at enhancing the welcoming and secure nature of vacation rentals, and will continue to prioritize privacy for our customers. Nice. But wait … what about Rojas? Thanks for the reminder, Expedia. So I asked Vrbo again — almost three months after Rojas had left and requested a
medium
129
Privacy, Vacation, Rental, Hidden Camera, Advocate. refund — about that lake house. And this time, Vrbo investigated. We’ve looked into the details of what happened and determined that the host and camera are in violation of our surveillance device policy. We’ve removed the property from our platform as we work with the host to correct the issue.
medium
130
Privacy, Vacation, Rental, Hidden Camera, Advocate. We’re also providing Diana Rojas with a full refund for the cost of her booking and have contacted her directly to process this. As you’re aware, we have a strict, long-standing policy against surveillance devices that violate the privacy and security of our guests. Surveillance devices capturing
medium
131
Privacy, Vacation, Rental, Hidden Camera, Advocate. the inside of a property are never allowed in listings on our platform. Surveillance devices outside a property, such as external security cameras or smart doorbells, are only allowed under specific rules and the host must always disclose their presence on the property listing page. Although these
medium
132
Privacy, Vacation, Rental, Hidden Camera, Advocate. occurrences are rare, our trust and safety team actively investigates any complaints about bad actors and takes action accordingly, including permanently removing any host in violation of our policies. I checked with Rojas, and she said Vrbo had indeed refunded her. Mostly. “They deducted $130 of
medium
133
Privacy, Vacation, Rental, Hidden Camera, Advocate. the total payment,” she told me. Still, she’s happy to get most of her money back. And having the lake house off Vrbo is a relief, too. But I wonder: Do these new surveillance policies go far enough? Should Vrbo and Airbnb consider banning all surveillance equipment in their rentals? Christopher
medium
134
Privacy, Vacation, Rental, Hidden Camera, Advocate. Elliott is the founder of Elliott Advocacy, a 501(c)(3) nonprofit organization that empowers consumers to solve their problems and helps those who can’t. He’s the author of numerous books on consumer advocacy and writes three nationally syndicated columns. He also publishes the Elliott Report, a
medium
135
Privacy, Vacation, Rental, Hidden Camera, Advocate. news site for consumers, and Elliott Confidential, a critically acclaimed newsletter about customer service. If you have a consumer problem you can’t solve, contact him directly through his advocacy website. You can also follow him on Twitter, Facebook, and LinkedIn, or sign up for his daily
medium
136
Monte Carlo Simulation, Mathematical Modeling, Yahtzee. Yahtzee is a dice game that, at first glance, requires little skills and a lot of luck. Nonetheless, as we’ll see in this article, some mathematical and simulation skills might be of great help to optimise your strategy. Beyond beating your friends at this game, I propose below an easy and informal
medium
138
Monte Carlo Simulation, Mathematical Modeling, Yahtzee. approach to mathematical simulation and Monte Carlo method to calculate the expectation of an event. Monte Carlo is a method used in many industries to calculate the statistical parameters of events that are otherwise not easy to formalise. The main idea is to simulate an event or a series of
medium
139
Monte Carlo Simulation, Mathematical Modeling, Yahtzee. event, and to replicate it a large number of times. The law of large numbers gives us a very interesting result: the average of the values observed on our simulation of the event on a large number of trials tends to get close to the actual expected value of the event. Thereby, by simulating a large
medium
140
Monte Carlo Simulation, Mathematical Modeling, Yahtzee. number of roll of dices following the rules of the Yahtzee, we will be able to calculate the probability to make some combinations. I will simulate the two combinations that give the most points in the game: Large Straight (5 sequential dices) and Yahtzee (all 5 dices the same). In the first part,
medium
141
Monte Carlo Simulation, Mathematical Modeling, Yahtzee. I will calculate the expectation of obtaining a large straight and a yahtzee in one roll of dice. The second part will cover the case when we absolutely want to reach one of these combinations, and thereby follow the most effective strategy to make it in three rolls. The whole code is available on
medium
142
Monte Carlo Simulation, Mathematical Modeling, Yahtzee. Github. Part 1: achieving the combination in one roll The roll of a dice can be simulated as a uniform distribution between 1 and 6. The dices are clearly independent from each other, which makes our simulation much easier: the expected value of obtaining the same value on all dices is the same as
medium
143
Monte Carlo Simulation, Mathematical Modeling, Yahtzee. the product of the expectations of each dice making this value separately. To calculate the probability of making a Yahtzee in one roll, we simulate a large number of rolls of five dices, and calculate how many times a Yahtzee is realised. As explained, the law of large number will allow us to get
medium
144
Monte Carlo Simulation, Mathematical Modeling, Yahtzee. close to the actual probability of this event, by calculating the average of the results. for exp in range(nbExp): # each exp is the simulation of 1 roll of dices for dice in range(nbDices): dices.append(np.random.randint(1, 7)) nbDifferentDices = len(set(dices)) if nbDifferentDices == 1: nbYahtzee
medium
145
Monte Carlo Simulation, Mathematical Modeling, Yahtzee. += 1 if (set(dices) == {1, 2, 3, 4, 5}) or (set(dices) == {2, 3, 4, 5, 6}): nbStraight +=1 dices = [] if exp>1 and exp%2==0: probaYahtzee.append((nbYahtzee / exp) * 100) probaStraight.append((nbStraight / exp) * 100) probaYhatzee1Roll = nbYahtzee / nbExp probaStraight1Roll = nbStraight / nbExp The
medium
146
Monte Carlo Simulation, Mathematical Modeling, Yahtzee. plot below displays the number of Yahtzee achieved after each roll, divided by the number of rolls realised. The plot clearly shows a trend towards the value 0.7. As the values are already multiplied by 100 for this plot, it comes out that a Yahtzee is realised in 0.7% of the times, or with a
medium
147
Monte Carlo Simulation, Mathematical Modeling, Yahtzee. probability of 0.007. The beauty of the Monte Carlo method shows us that the expected value quickly reaches the zone of 5% around the actual expected value. That’s the strength of this method. The same method, used to calculate the expected value of making a Straight in one roll runs even quicker
medium
148
Monte Carlo Simulation, Mathematical Modeling, Yahtzee. to the 5% accuracy zone around the actual expected value: 0.03. We’ve covered the easiest part so far. Indeed, the independence between the distribution of the dices makes the implementation quite easy, with just a few lines of codes. The game of Yahtzee let the player roll the dices three times at
medium
149
Monte Carlo Simulation, Mathematical Modeling, Yahtzee. each round, making it possible for the user to bring in some strategy. We will tackle its simulation in the next part. Part 2: achieving Yahtzee or Straight in three rolls The strategy of the player clearly induces dependence between the different rolls, making the mathematical calculation of the
medium
150
Monte Carlo Simulation, Mathematical Modeling, Yahtzee. expected value much more complicated. Modelling and simulating it becomes essential to calculate the expected value of a specific combination. To make things slightly easier, I assume that the player aims only for a Yahtzee or a Straight (let’s say it’s the last round of the game, only one
medium
151
Monte Carlo Simulation, Mathematical Modeling, Yahtzee. combination to go), and follows the strategy most likely to reach its aim. The first round is always random. Following it, to make a Yahtzee, the player will store the dices with value of most appearance, and roll again the other ones. Let’s say the first round results in the following combination:
medium
152
Monte Carlo Simulation, Mathematical Modeling, Yahtzee. {1, 4, 5, 4, 2}. The player keeps the two 4s, and rolls the other dices, aiming at obtaining only 4s. The same strategy is followed for the third roll. To simulate the game, an object oriented approach is here very useful, as it allows me to keep track of the different steps in a organised and
medium
153
Monte Carlo Simulation, Mathematical Modeling, Yahtzee. structured way. The class RoundYahtzee will make the repetition much easier. class RoundYahtzee: def __init__(self): self.rollsPlayed = 0 self.dicesRoll1 = {} self.dicesRoll2 = {} self.dicesRoll3 = {} self.valueForYahtzee = 0 self.nbDices = 5 For the sake of the plot, in this part I will create
medium
154
Monte Carlo Simulation, Mathematical Modeling, Yahtzee. many iterations of the process of simulating a large number of rounds. nbRounds = 500 nbYhatzee = 0 iterations = 200 resultIter = [0] * iterations for iteration in range(iterations): nbYhatzee = 0 for i in range(nbRounds): # each round, we start over again with the same strategy yahtzeeRound =
medium
155
Monte Carlo Simulation, Mathematical Modeling, Yahtzee. RoundYahtzee() if yahtzeeRound.completeRound(): # We store the result when a Yahtzee is achieved nbYhatzee += 1 resultIter[iteration] = nbYhatzee / nbRounds To display the results differently, we will again simulate a complete round a large number of times, and this time use a bar plot, in order to
medium
156
Monte Carlo Simulation, Mathematical Modeling, Yahtzee. observe the distribution more clearly. The pattern seems to follow a normal distribution, with a mean value of 0.046, meaning a player has about 4.6% change a realising a Yahtzee if they follow the best strategy to make it. For the large straight simulation, we assume that the player aims for a
medium
157
Monte Carlo Simulation, Mathematical Modeling, Yahtzee. combination {2, 3, 4, 5, 6}, to simplify the model. This would provide the same result as a {1, 2, 3, 4, 5}, and the player has to decide on a target combination anyway. The distribution obtained follows a similar distribution, this time with a higher expectation: 0.26. The large straight is
medium
158
Monte Carlo Simulation, Mathematical Modeling, Yahtzee. thereby easier to achieve than a yahtzee. This result was expected: once a value is fixed for the Yahtzee, all dices have only 1/6 chance of providing this value for each of the next rolls. For straight, let’s say two values are fixed after the first roll, the remaining three dices have 3/6 change
medium
159
Monte Carlo Simulation, Mathematical Modeling, Yahtzee. of providing one of the remaining needed values. This explains the larger number of points obtained for achieving a yahtzee rather than a large straight! Conclusion This article was an easy and playful approach of Monte Carlo method to find the expected value of an event that is not easily
medium
160
Monte Carlo Simulation, Mathematical Modeling, Yahtzee. calculated by mathematical formulas. The complexity lies in finding the appropriate simulation of the event in a computational way. The magic of the law of large numbers accomplishes the rest. The limitation of this methods lies in the computational capacity available (in this case, between few
medium
161
Monte Carlo Simulation, Mathematical Modeling, Yahtzee. seconds and few minutes were necessary to run the simulations). This little project helped me understand how to simulate events and how powerful the Monte Carlo can be. I hope it will provide the reader some insight and understanding of this method. Please provide me any feedback in case of
medium
162
Statistics, Probability, Probability Distributions, Random Variable, Data Science. Master the random variables and probability distributions and crack your next Data Science Interview with the third part of our Statistics Cheat Sheet series Photo by Naser Tamimi on Unsplash Random Variables In mathematical terms, a random variable is a number whose value is dependent upon the
medium
164
Statistics, Probability, Probability Distributions, Random Variable, Data Science. outcome of a random event. For example, if we define the random variable (X) to be the number of times, we get a head while tossing a coin twice. Note: We use uppercase to denote the variable and lowercase to denote a single value of X. Here, x = 1 when exactly one head comes up in two tosses of
medium
165
Statistics, Probability, Probability Distributions, Random Variable, Data Science. the coin. Let us take another example. Let Y denote the number that shows up in the roll of a dice. The random variable Y could be any number from 1 to 6. Probability Distribution Let us write down the probabilities of the outcomes. The probability distribution for X (number of heads while flipping
medium
166
Statistics, Probability, Probability Distributions, Random Variable, Data Science. a coin twice) can be written as Pr(X = x). We get the following probabilities. We can plot these values in a histogram Image by author For the random variable Y (the number on the face of the die), the probabilities look like this. And the histogram for Y looks thus. Image by author The tables and
medium
167
Statistics, Probability, Probability Distributions, Random Variable, Data Science. histograms describe the probability distribution of the random variable. A probability distribution is a mathematical description of the probabilities (or likelihood) of different outcomes in a random event. Probability Mass Function The examples we have considered till now have a finite number of
medium
168
Statistics, Probability, Probability Distributions, Random Variable, Data Science. outcomes. We cannot have 1.4 heads while tossing a coin twice. Therefore the probabilities associated with these outcomes, too, will be finite. The random variables are, therefore, Discrete Random Variables. The probability distribution for a discrete random variable is also called the probability
medium
169
Statistics, Probability, Probability Distributions, Random Variable, Data Science. mass function (PMF). We will look at continuous variables a little later in the article. Cumulative Distribution Function Another way of representing the probabilities associated with a random variable is to map the cumulative probabilities. A cumulative probability for a random variable X at value
medium
170
Statistics, Probability, Probability Distributions, Random Variable, Data Science. x is the probability that X takes a value less than or equal to x. Typically we use the uppercase F to represent a cumulative probability. Therefore F(x = a ) = Pr(X ≤ a). This function is called the cumulative distribution function (CDF). The advantage of a CDF is that it has the same definition
medium
171
Statistics, Probability, Probability Distributions, Random Variable, Data Science. irrespective of whether the variable is discrete or continuous. For the examples above, we can construct the CDF by just adding up the PDF. For our coin toss example The CDF can be plotted thus. Image by author And for the die roll, The CDF can be plotted as follows. Image by author Discrete
medium
172
Statistics, Probability, Probability Distributions, Random Variable, Data Science. Probability Distributions Theoretically, there can be infinitely many probability distributions. However, a handful of them appears so frequently that they merit special mention. Let us look at some prominent discrete probability distributions. Uniform Distribution The discrete uniform distribution
medium
173
Statistics, Probability, Probability Distributions, Random Variable, Data Science. describes a random variable that can take on a finite number of discrete values, with all values being equally likely. A very common example is tossing a coin once. Getting a head or getting a tail is equally likely. Another example is rolling a die. Each of the six numbers is equally likely.
medium
174
Statistics, Probability, Probability Distributions, Random Variable, Data Science. Mathematically, the PMF of a Discrete Uniform Distribution is defined by two parameters, a, and b, where a is the minimum value the random variable can take and b, is the maximum. PMF is given by where x is the outcome of the random variable, and the values of x range from a to b, inclusive.
medium
175
Statistics, Probability, Probability Distributions, Random Variable, Data Science. Applying this to the case of rolling a die a = 1, b = 6 Binomial Distribution The binomial distribution describes the number of successes (x) in a fixed number of trials or repetitions (n). Each of the trials has only two possible outcomes: success or failure. Further, the probability of success in
medium
176
Statistics, Probability, Probability Distributions, Random Variable, Data Science. a given trial always remains constant. Let us call it p. Each of these trials or repetitions is called a Bernoulli trial. The probability distribution is given by where x is the number of successes in n trials, The above denotes the binomial coefficient given by Application of the Binomial
medium
177
Statistics, Probability, Probability Distributions, Random Variable, Data Science. Distribution In an office, 80% of the employees arrive between 8 AM and 9 AM. Find the probability that on a given day, at least seven of the ten employees will arrive between 8 AM and 9 AM. There above problem represents a Binomial Distribution with 10 trials and a probability of success of 80% or
medium
178
Statistics, Probability, Probability Distributions, Random Variable, Data Science. 0.8. We need to calculate the probability that X ≥ 7. Therefore, we need to calculate P(X = 7) + P(X = 8) + P(X = 9) + P(X = 10) Applying the binomial formula, we get Similarly P(X = 8) = 0.302 P(X = 9) = 0.268 P(X = 10) = 0.107 Therefore P(X ≥ 7) = 0.201 + 0.302 + 0.268 + 0.107 = 0.878 or 87.8%
medium
179
Statistics, Probability, Probability Distributions, Random Variable, Data Science. Geometric Distribution The Geometric Distribution builds on the Binomial Distribution. Here the trials (or repetitions) continue until success occurs rather than a set number of trials. Theoretically, the trials can continue indefinitely. For example, suppose you keep rolling a die till you get the
medium
180
Statistics, Probability, Probability Distributions, Random Variable, Data Science. number 6. In theory, we might go on an extremely unlucky streak and not get a six. The PDF for a geometric distribution is given by Where X denotes the number of repetitions needed to get the first success. This is the PDF of a Geometric Distribution with p = 0.2. Image by author Application of the
medium
181
Statistics, Probability, Probability Distributions, Random Variable, Data Science. Geometric Distribution In a town, 60% of the population is female. Find the probability that a person will need to meet three people before meeting the first male. Let us write the problem down in simple English. The probability that only the third person we will meet is a male is Probability that
medium
182
Statistics, Probability, Probability Distributions, Random Variable, Data Science. the first person we meet will be a female and the second person we meet will be a female, and the third person we meet will be a male Now it is easier to calculate the values. The probability of meeting a female is 60%, and the probability of meeting a male is (100–60)% = 40% Therefore, the
medium
183
Statistics, Probability, Probability Distributions, Random Variable, Data Science. required probability = 60 % x 60 % x 40% = 14.44% Alternatively, we could use the formula. Here x = 3 and p = 40% or 0.4 Therefore or 14.44% Poisson Distribution Another very common discrete distribution is the waiting time distribution or the Poisson Distribution. Poisson distribution describes
medium
184
Statistics, Probability, Probability Distributions, Random Variable, Data Science. the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known average rate and independently of the time since the last event. The common applications include finding how many lines a shopping center should keep so as not to overload
medium
185
Statistics, Probability, Probability Distributions, Random Variable, Data Science. the system. There is only one parameter needed — the average number of occurrences during the interval period. This parameter is usually represented by λ. The Probability Distribution for a Poisson Process is given by where λ is the average number of occurrences in the interval, x is the number of
medium
186
Statistics, Probability, Probability Distributions, Random Variable, Data Science. occurrences of the event (or successes) in the given interval, e is the natural logarithm (approximately 2.718). The PDF of a Poisson Distribution with different values of λ Image by author Application of the Poisson Distribution It is observed that a WhatsApp group gets 45 messages per day. What
medium
187
Statistics, Probability, Probability Distributions, Random Variable, Data Science. is the probability that it will receive more than two messages in the next half hour? Our time frame (or interval) of interest is half an hour. We start by calculating the average number of messages received every half hour. In a day, there are 24 hours, so 24x2 = 48 half-hour periods. The average
medium
188
Statistics, Probability, Probability Distributions, Random Variable, Data Science. number of messages received each half hour (λ) = We need to find P(x > 2). We can find this by Plugging in x = 0, 1, 2 and λ = 0.9375 into the formula, we get Continuous Probability Distribution Till now, we have looked at variables that have a finite set of values (Heads or Tails on a coin, Number
medium
189
Statistics, Probability, Probability Distributions, Random Variable, Data Science. on the face of a die, etc.) only. But in real life, variables can have infinitely many values. Let us take the case of a person arriving between 1 PM and 2 PM for a lunch appointment. Assuming that a person can come any time, the chances of him arriving between 1:10 and 1:30 PM can be calculated as
medium
190
Statistics, Probability, Probability Distributions, Random Variable, Data Science. Favorable time period = 1:10 PM to 1:30 PM = 20 minutes Total time period = 1 hour = 60 mins. Therefore probability = ⅓.. However, if you want to calculate the probability of him arriving exactly at 1:15 PM, it will depend on how accurately we measure time. If we are measuring by rounding to the
medium
191
Statistics, Probability, Probability Distributions, Random Variable, Data Science. nearest minute, it will be 1 in 60. If we measure to the last second, then it will be 1 in 3600. If we measure in milliseconds, then 1 in 3.6 million and so forth. As you can see, the exact moment of arrival can be split into further smaller segments. It can take infinitely many values. Therefore
medium
192
Statistics, Probability, Probability Distributions, Random Variable, Data Science. the probability of him arriving at a given point in time is zero. Such variables are called continuous variables. Formally if you draw the cumulative distribution function (CDF) for a continuous random variable, it will not have any breaks (or steps) that we saw earlier in, say, rolling a die.
medium
193
Statistics, Probability, Probability Distributions, Random Variable, Data Science. Image by author The CDF for a continuous variable will look like this. Image by author For continuous random variables, we find the probability for intervals (as in the case of arrival times described above) rather than individual values. While the math is a bit tricky as it involves calculus,
medium
194
Statistics, Probability, Probability Distributions, Random Variable, Data Science. intuitively, we can use the concepts from discrete random variables for continuous variables as well since we can convert a continuous random variable to a discrete one by rounding off (as we did in the seconds to the minute example described above). Probability Density Function As we have seen,
medium
195
Statistics, Probability, Probability Distributions, Random Variable, Data Science. the probability of a continuous random variable at a particular value is always zero. Therefore for continuous variables, we find the amount of change in CDF at any instance. This change is called the Probability Density Function. In terms of calculus, PDF is the differential of CDF. The PDF of the
medium
196
Statistics, Probability, Probability Distributions, Random Variable, Data Science. continuous random variable will look like this. Image by author To find the probability between two points, we find the area under the curve (integrate the PDF over these two points using integral calculus). Luckily, we do not need to do that. We can easily calculate these values using Python or
medium
197
Statistics, Probability, Probability Distributions, Random Variable, Data Science. any spreadsheet software. Note: For any continuous probability distribution, This is because the exact probability at a particular value is always zero. Continuous Uniform Distribution As with discrete uniform distribution, for a continuous uniform distribution too, the events are equally likely to
medium
198
Statistics, Probability, Probability Distributions, Random Variable, Data Science. occur. Only the range of values possible is infinitely many. The PDF for continuous distribution is given by for a ≤ x ≤ b where a is the lowest possible value, and b is the highest possible value. Application of the Continuous Uniform Distribution It takes between five to fifteen minutes for a cab
medium
199
Statistics, Probability, Probability Distributions, Random Variable, Data Science. to arrive after it is booked on the Suber app. What is the probability that a customer will have to wait for more than twelve minutes for a cab? Let us try this to solve this without using a formula. Similar to the PMF for discrete uniform distribution, we can draw the PDF for the continuous one.
medium
200
Statistics, Probability, Probability Distributions, Random Variable, Data Science. Image by author The area under the whole curve should be equal to 1 since it is certain that the cab will come within this time period. The width of the rectangle is 15–5 = 10 units. Since the area is 1, the height should be below which is = 0.1. To find P(x > 12), we can find the area of the
medium
201
Statistics, Probability, Probability Distributions, Random Variable, Data Science. shaded portion P(5 ≤ x ≤ 12) and subtract from 1. Image by author Area of the shaded portion Therefore, Exponential Distribution Another continuous distribution commonly encountered is the exponential distribution. It models the amount of time until a specific event has occurred. For example, the
medium
202
Statistics, Probability, Probability Distributions, Random Variable, Data Science. time taken to service a customer, how long a part would last before it has to be replaced, etc. The PDF for an exponential distribution is given by where m is called the decay factor. It is calculated as the reciprocal of the historical average waiting time. The CDF for the distribution is given by
medium
203