Giter Site home page Giter Site logo

adijo / data-science-prep Goto Github PK

View Code? Open in Web Editor NEW
114.0 7.0 59.0 6.07 MB

Problems from https://datascienceprep.com/

Python 10.25% Jupyter Notebook 89.75%
data-science-interview machine-learning-interview data-science interview-prep machine-learning probability datascience machinelearning statistics

data-science-prep's People

Contributors

adijo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

data-science-prep's Issues

Wrong result for Q15:"Max Dice Roll"

Hi @adijo, I believe that in your PDF, the solution for question 15 "Max Dice Roll" is not the expected answer.

You write the formula for P(max{X1, ..., Xn} <= r) but we don't want the probability that the largest number rolled is less than (or equal to) r. We want the probability that the largest number rolled is equal to r.

So the expected result is P(max{X1, ..., Xn} = r) which changes the formula:

P(max{X1, ..., Xn} = r) = r^n/6^n - (r-1)^n/6^n
(from here)

You can verify that the PDF formula does not give the wanted result:

  • for n=1 and r=2: "What is the probability that I roll a 2?" We know it's 1/6 but the formula gives 2/6.
  • for r=6: "What is the probability that the largest number rolled is 6?". The formula gives a probability of 1, which means that whatever the number of rolls, we will get a 6! That would be nice!

Q21 in pdf

The total number of possibilities was considered as 8-1 =7

But why will the order matter here, isn't 101, 110 and 011 the same ?

I think there are three possibilities that contain at least one fan viz (fan, not fan, not fan), (fan, fan, not fan) and (fan, fan, fan)

out of these only one combination has exactly one fan, so probability is 1/3

Expected value of dice roll is 3.5, not 3 (question 6)

In Question 6 โ€“ Picking between two dice games, you state the expected value E[X] of a dice roll (X โˆผ Uniform(1, 6)) is 3, when it is actually 3.5. This results in a very different expected value for E[XY] of 3.5 * 3.5 = 12.25 and E[Z^2] = 2.92 + 12.25 = 15.17.

Other than that, I enjoyed reading through your solutions. Cheers!

Question 10 - Flipping Game

I had the initial idea that P(HH) = P(TH) as well, but list out a few possibilities and you'll see that this isn't the case! In fact, this game is very biased towards one side. Try to consider what happens when the first coin flip yields T.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.