Live data from Hacker News

My Most Interesting Interview Problem

austinrochford.com

51–56 of 56 posts

Re: My Most Interesting Interview Problem

#51

in clear probability related context, the guy uses "uniformly distributed" and "normally distributed" interchangeably. I usually fail interview with such guys. The most recent spectacular failure happened when interviewer asked about sets, i described Java Set interface as an example (they are Java shop so i thought the choice was right), looking dissatisfied he asked to talk about "sets" in general, and got, lets sa…

Ooops, that was a typo, thanks for catching it!

Re: My Most Interesting Interview Problem

#52
post #43

Q for the math guys: Is this the closed form pdf of the angle distribution of one quarter of the circle? http://www.wolframalpha.com/input/?i=1%2Fcos%28min%28x%2Cpi%... 1/cos(min(x,pi/2-x)) plus the normalization term to make \int(..) == 1: http://www.wolframalpha.com/input/?i=int+1%2Fcos(min(x%2Cpi%... Constructed by arguing that the probability is directly proportional to the length of the hypotenuse.

It looks alright to me, but you'll have to normalise it for it to be a pdf

Yes, that's what the second link is for to normalize it. Maybe I should've made that clearer.

Re: My Most Interesting Interview Problem

#53

in clear probability related context, the guy uses "uniformly distributed" and "normally distributed" interchangeably. I usually fail interview with such guys. The most recent spectacular failure happened when interviewer asked about sets, i described Java Set interface as an example (they are Java shop so i thought the choice was right), looking dissatisfied he asked to talk about "sets" in general, and got, lets sa…

This was almost painful to read, mostly because I've been through the same kind of interview many times. It is also amusing that another comment here is assuming that you were the interviewer in this example, when you were actually the interviewee.

The depressing thing is that this interviewer probably went back to HR (if the company even had an HR department) and told them that you didn't know anything about basic sets (whatever that means).

The interviewer's line of questioning amounted to guess what number I'm thinking of that is between 1 and 100.

Re: My Most Interesting Interview Problem

#54
post #8

Earlier quoted context omitted.

> Why is your construction 'uniform' on the circle? That's a very good question, and the sort of thing that would need to be in a comment somewhere. The answer is that the bi-normal distribution is rotationally symmetrical, a fact that is not immediately obvious. > I'd rather take a random uniform distribution > from 0 to pi and take it as the arc-length. That's a good solution for the simple one-dimensional circle i…

Yes, I see and understand. Thanks for the info. It is obvious if you think of it (exp(x1^2+...+xn^2) is symmetric on all the variables). Yep, understood.

That's not quite what "rotational symmetry" means in this context. A collection of random variables independently distributed according to identical "doubly-rectified" exponential distributions would also be symmetric under variable interchange.

However, this represents invariance only under sequences of axis-aligned rotations that are multiples of pi/2. The joint distribution of a collection of independently and identically normally-distributed random variables is invariant under arbitrary rotations, which is a much stronger form of invariance.

E.g., if you drew [x1...xn] from a distribution like exp(-|x1|-|x2|-...-|xn|), which is invariant with respect to variable interchange, and normalized to unit length, the resulting distribution would be markedly non-uniform over the surface of the n-dimensional unit hyper-sphere.

In fact, the differences in the symmetries of these distributions are crucial to the relative behaviors of L1 and L2 regularizers in machine learning. These differences have significant practical, and not merely theoretical consequences.

Re: My Most Interesting Interview Problem

#55
post #32

Earlier quoted context omitted.

I think you meant 2*pi? Wouldn't that only fill the top half of the circle?

Yes I obviously did mean 2*pi but I always get confused with these two numbers... Not that it matters much, being a lecturer in Mathematics...

"Not that it matters much, being a lecturer in Mathematics..."

Trigonometry was always my favorite Math. But my second calculus class in college was taught by a brilliant (I later found out) native-Hindi speaker. His English was good enough but it took me three weeks to correctly write down the fractions he was quoting as "three under two".

Re: My Most Interesting Interview Problem

#56
post #54
post #8

Earlier quoted context omitted.

Yes, I see and understand. Thanks for the info. It is obvious if you think of it (exp(x1^2+...+xn^2) is symmetric on all the variables). Yep, understood.

That's not quite what "rotational symmetry" means in this context. A collection of random variables independently distributed according to identical "doubly-rectified" exponential distributions would also be symmetric under variable interchange. However, this represents invariance only under sequences of axis-aligned rotations that are multiples of pi/2. The joint distribution of a collection of independently and ide…

Right, symmetry! rotational symmetry, which is the one required for this problem. Thanks.
Post reply on HN