Binomial

A company called Birrus Mac has deployed a malicius worm on the net. The effects of that malware on the file systen is unknown. Suppose any possible PC can be infected. If the probability of an infection in any local PC is 0.116 and the probability that it does not corrupt your files is 0.171 . What do you thing will happen if your organization have 12 local PC computers, and the average number of files in there are 12 . Treat each sitaution as a separate problem

  1. What is the probability that we have between 2 and 8 PC’s infected ? Result: 0.414
pbinom(8, 12, 0.116) - pbinom(1, 12, 0.116)
## [1] 0.4136626
  1. What is the probability that more than 4 PC are infected ? Result: 8.22e-3
1 - pbinom(4, 12, 0.116)
## [1] 0.008223143

Geometric Distribution

A group of coders are trying to prepare themselves to get a position at google. They already know no bugs permitted, at all. They can also decide to code with Python which google supports or Javi (a Java new implementation no one likes) What do you think will happen if the probability that you make a bug coding in Python is 0.116 and if you are programming in Javi the probability of writting goog code is 0.688 . You are coding different methods, programs and functions. Could you please solve the following questions if you need to write a good method or program in order to start interveiws with google:

  1. Draw the pmf of the number of attempts up to and including the first No Bug code (Python)

  2. What is the probability that at least 4 attempts are needed to get a program with no bugs (Javi)?

HyperGeometric Distribution

A big company has two main departments. The Engineers Department and the Economist Department. Between both departments there are 55 employees which can be rised to the Board Of Directors. However only 7 positions are available. If there are 13 Engineers.

Can you try to solve these questions in the assumption that all employees are equally likely to join the BOD?:

  1. What is the probability that less than 3 are Engineers? Result: 0.796
phyper(2, 13, 55-13, 7)
## [1] 0.7959763
  1. What is the probability that no Engineer in the Board of Directors? Result: 0.133
dhyper(0, 13, 55-13, 7)
## [1] 0.1329455

Poisson Distribution

App entertainment has upload a new App to Google Play and Apple Store. The expected number of payed downloads per day is supposed to be 29 Solve the following questions:

  1. What is the probability that more than 18 downloads per day? Result: 0.98
1 - ppois(18, lambda=29)
## [1] 0.9801308
  1. What is the probability that the exactly 2 downloads per day? Result: 1.07e-10
dpois(2, lambda =29)
## [1] 1.069611e-10