Expected Distances on a Unit Disc | Quant Interview Questions

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ก.ย. 2024

ความคิดเห็น • 26

  • @eugeneemono5289
    @eugeneemono5289 2 ปีที่แล้ว +3

    I appreciate your variety of approaches. 2/3 also follows by deriving the c.d.f of X (random variable denoting the distance to (0,0) of a point in circle of radius R): P(X

    • @atypicalquant
      @atypicalquant  2 ปีที่แล้ว +1

      You're right about the alternative approach using the cdf of the radius. It was actually on the shortlist of solutions for this problem, and I strongly considered including it in the video as well :)

    • @kesavanandm9109
      @kesavanandm9109 ปีที่แล้ว

      Great solution Eugene. My thinking was same (but I made a mistake of solving for a ring instead of a disc).
      @@atypicalquant To be honest this looks like a simpler/intuitive approach.
      I think we can also derive the generic expected value as 2/3.R where R is any arbitrary radius.
      cdf = prob(x

  • @ngyeowhwee8745
    @ngyeowhwee8745 ปีที่แล้ว +2

    Another possible approach based on your drawing of concentric circles in Soln2, without talking about cdf...but not sure if this is wrong since it's very simple: the area is just the sum of all these circumferences 2Pi r from r=0 to 1. So the probability of landing on a circle of radius r is (2Pi r)/Pi = 2r. Hence the expected value is just these weighted probabilities, ie \int_0^1 (2r)*r = 2/3...?

    • @atypicalquant
      @atypicalquant  ปีที่แล้ว

      Very interesting approach! It does seem to be correct, while it might not be rigorous enough. It still touches on the idea of PDF, since it computes the density of the distance being equal to a particular r. In the end, your solution also integrates over r in the interval [0,1] and you get the same (correct) result!

  • @TheLargedwarf
    @TheLargedwarf ปีที่แล้ว +1

    If the distribution is uniformly distributed in Polar coordinates (r is uniform between 0 and R, theta is uniform between 0 and 2pi) then the answer is 0.5.

    • @atypicalquant
      @atypicalquant  ปีที่แล้ว

      You are correct, that's exactly the solution! The video, though, aims to both prove the change of variable formula that you are stating, and to give an alternative solution that is less calculus-y.

  • @alpatovivan
    @alpatovivan 2 ปีที่แล้ว

    Thanks for the video! In the 2nd solution it's not obvious that distances are preserved during transformation.

    • @atypicalquant
      @atypicalquant  2 ปีที่แล้ว

      Glad to know you are enjoying (at least the first solution in) this video!
      For the second one, you are right that the distances are not preserved, but they are transformed. The distance between a point X and the center on the disc, becomes the x coordinate of the point in the triangle. This is a direct consequence of the construction, moving all the points on one circle on the same verical line

  • @Zarifzar4
    @Zarifzar4 2 ปีที่แล้ว

    I had a suggestion for a problem if you are interested since I encountered it during my Quant intern interview -> "What is the expected number of cards that need to be turned over in a regular 52-card deck to see the first ace?"
    The question is more simplistic than what you do in your channel, but I would love to hear some explanations that can make us understand more intuitively.

    • @atypicalquant
      @atypicalquant  2 ปีที่แล้ว +1

      Hey, thanks for the suggestion, however if I understood correctly, it's the same problem that I've covered here: th-cam.com/video/kX9tx5F_KwY/w-d-xo.html

    • @Zarifzar4
      @Zarifzar4 2 ปีที่แล้ว

      @@atypicalquant Oh my god! I feel so stupid, I’m going to study that video right now! Thank you for the response.

  • @marcotagliani3385
    @marcotagliani3385 ปีที่แล้ว +1

    both solutions are a bit over-complicated, no? The probability of falling in a "ring" inside the circle is the length of the ring divided by the area of the circle. Every point in a ring is the same distance from the center. Just integrate over all possible ring distances, [0,1] int(2*pi*r * r)/pi

    • @atypicalquant
      @atypicalquant  ปีที่แล้ว

      I would not call the first solution over-complicated. It is the straightforward solution with calculus, with the added step of proving the change of variable formula. You are not expected to prove this, usually, and most people will know the formula, but I wanted to prove it rigorously.

  • @Nickelnine37
    @Nickelnine37 ปีที่แล้ว

    No need to involve theta in the calculation at all due to the symmetry. dA = r dr dtheta, therefore p(r) = 2r. Integrate 2r^2 from 0 to 1 and voila

    • @atypicalquant
      @atypicalquant  ปีที่แล้ว

      You are indeed correct! For this particular situation, I preferred proving the statement dA = r dr d theta.
      Probably most of the viewers take this statement as a given, but I think sometimes it’s useful to get a refresher into how to perform these changes of variable.

  • @chanandlerbong5484
    @chanandlerbong5484 2 ปีที่แล้ว

    Oh my Gush, probability of event that distance from the point to the center is less or equal r is just a ratio of area of disk of radius r and area of unit disk. So we get CDF that equals r squared, when r between 0 and 1. Take derivative and we get PDF that equals 2r. And to get expected value we just calculate integral from 0 to 1 of function 2r**2 which equals 2/3.

    • @atypicalquant
      @atypicalquant  2 ปีที่แล้ว

      You're solution is correct. As I've stated in another comment, the solution using the cdf of the radius was also on the shortlist of ideas to be included in the video. In the end, I opted for the ones that are included, given that I consider knowing how to use the Jacobian in a change of variable a useful skill.

    • @chanandlerbong5484
      @chanandlerbong5484 2 ปีที่แล้ว

      @@atypicalquant Thank you! Also my solution is more convenient to find the median of r.v. min(X, 1 - X), where X - distance from the point to the center. I had this question on the interview

    • @alessandrosalvatore3826
      @alessandrosalvatore3826 2 ปีที่แล้ว

      @@chanandlerbong5484 it is 1/4, right?

    • @chanandlerbong5484
      @chanandlerbong5484 2 ปีที่แล้ว +1

      @@alessandrosalvatore3826 Yep, fratello mio

    • @alessandrosalvatore3826
      @alessandrosalvatore3826 2 ปีที่แล้ว

      @@chanandlerbong5484 ti posso chiedere qua o su qualche altro social per che firm e posizione fosse l'interview e quali altri tipi di domande ti hanno fatto?

  • @lostcause5522
    @lostcause5522 2 ปีที่แล้ว

    Am I not cut out for quant if I can’t solve most of these on my own

    • @atypicalquant
      @atypicalquant  2 ปีที่แล้ว +1

      I think that what you have to keep in mind is the fact that you might not be able to solve these problems on your own, *for now*. Few people can whip up solutions to them without some former practice, and the more you train yourself in this type of questions,, the better you become.
      When trying to solve them, it's important to give yourself an actual chance at finding the solution, spending a lot more time than the recommended few minutes that you would get in an interview. After you have truly tried it, then you can look at the solution. To test that you understood in completely, try and solve these problems again after a few days, then change some of the constants and solve them again. I think that in. O time you will find that you can solve most of these, or at least have a pretty good intuition on them, which is a very important factor during an interview.