[HN Gopher] Square roots and maxima
___________________________________________________________________
Square roots and maxima
Author : surprisetalk
Score : 116 points
Date : 2024-11-30 15:33 UTC (1 days ago)
(HTM) web link (leancrew.com)
(TXT) w3m dump (leancrew.com)
| ndsipa_pomu wrote:
| Matt Parker's video on Square Roots and Maxima:
| https://www.youtube.com/watch?v=ga9Qk38FaHM
| raegis wrote:
| The original post verifies the fact (experimentally) using
| simulations, and includes example code. However, the guy in the
| video you referenced does a lot of talking around the problem,
| and includes a VPN advertisement in the middle. I never heard
| of Matt Parker before, and I'm not knocking his talent (he has
| 1.24 million subscribers!), but the only coherent part of the
| video is where he includes an explanation from another channel,
| 3blue1brown.
| stouset wrote:
| They target different audiences. 3B1B tends to aim at those
| who want to know more of the underlying math and develop good
| analytical thinking, Matt Parker often keeps things at a bit
| more approachable a level for those who aren't as inclined.
| magicalhippo wrote:
| Matt Parker is an ex-math teacher that does stand-up math
| comedy shows[1], FWIW.
|
| [1]: https://standupmaths.com/
| ndsipa_pomu wrote:
| He's a comedian and maths communicator (including author). He
| appears in quite a few Numberphile videos too. He seems to be
| friends with quite a few YouTube maths presenters such as
| Grant Peterson and Hannah Fry (she seems to have moved over
| to TV presenting now which is good - I think she'd be an
| excellent choice to do a James Burke style Connections series
| as she also has a dry wit).
| boltzmann64 wrote:
| People waste so many hours watching these types of video
| where the presenter talks a lot around the problem (has lots
| of fluff, comedy skit and ads). I think the presenter should
| have used this opportunity to introduce random variables,
| independence, Tschebyscheff inequality and explained the
| "bizzare" puzzle.
|
| Or if you are going to do this with simulation, then a
| introduction to Monte Carlo methods, and why such simulations
| work and provide correct results would have been a better us
| of viewer's time.
|
| But videos like this just state a fact and then handwave
| around the fact without hitting the core idea. The viewer
| leaves with a false sense of understanding, and keep
| wondering about the "bizzare" fact, when it is nothing but
| good ol' introductory probability. YouTube math needs reform.
| ndsipa_pomu wrote:
| I think there's room for Matt Parker's more "fluffy" type
| of maths presentations as well as the more in depth Grant
| Sanderson's visualisations. Matt is on a mission to
| popularise maths and it's easy for anyone that gets
| inspired/intrigued by a topic to dig deeper.
|
| Rather than a reform, maybe there's room for more maths-
| based videos to fill the gap between recreational and more
| serious maths?
| dahart wrote:
| Either I haven't seen this before, or forgot it, but it's
| surprising because I use the sum of independent uniform variables
| every once in a while -- the sum of two vars is a tent function,
| the sum of three is a smooth piecewise quadratic lump, and the
| sum of many tends toward a normal distribution. And the
| distribution is easy calculated as the convolution of the input
| box functions (uniform variables). Looking it up just now I
| learned the sum of uniform variables is called an Irwin-Hall
| distribution (aka uniform sum distribution).
|
| The min of two random vars has the opposite effect as the max
| does in this video. And now I'm curious - if we use the function
| definition of min/max -- the nth root of the sum of the nth
| powers of the arguments -- there is a continuum from min to sum
| to max, right? Are there useful applications of this generalized
| distribution? Does it already have a name?
| max_likelihood wrote:
| Perhaps you are thinking of Order Statistics?
| https://en.wikipedia.org/wiki/Order_statistic
| dahart wrote:
| Ah, fascinating, I've never used Order Statistics. It doesn't
| look exactly like what I was thinking, but there is also a
| continuum from min to median to max, similar to min to
| mean/sum to max. I'm not sure but I might guess that for the
| special case of a set of independent uniform variables, the
| median and the mean distributions are the same? Does this
| mean there's a strong or conceptual connection between the
| Bates distribution and the Beta distribution? (Neither
| Wikipedia page mentions the other.) Maybe Order Statistics
| are more applicable & useful than what I imagined...
| falseprofit wrote:
| Median and mean are not the same distribution. Consider
| three uniform values. For the median to be small two need
| to be small, but the mean needs three.
|
| I think order statistics are more useful than what you
| described, because "min" and "max" are themselves quantiles
| and more conceptually similar to "median" than to "mean".
|
| Trying to imagine how to bridge from min/max to mean, I
| guess you could take weighted averages with weights
| determined by order, but I can't think of a canonical way
| to do that.
| adgjlsfhk1 wrote:
| the canonical mapping is via norms. min is the 0 norm, 1
| is the mean and the inf norm is maximum
| btilly wrote:
| The reason that they do not look the same is that the order
| statistics are there presented for an exponential function,
| which has an unbounded upper range. When you do it on a
| uniform distribution with n variables, you get an n'th
| power and n'th root at the extremes, with varying lopsided
| normal-looking distributions in between.
| jvanderbot wrote:
| I build a whole TTRPG around this fact, so that it's easier to
| create realistic performance curves for characters as they
| skill up.
|
| Yeah I'm real fun at parties.
| somat wrote:
| One of the things I liked about the Heavy Gear table top game
| was that the roll mechanic was to roll N dice and pick the
| highest. where N was your skill level. Now this did make the
| game somewhat brutal. but there was a lot less of the absurd
| high skill wiffing you see as in a D & D type system.
|
| The other neat thing Heavy Gear did was they had none of this
| ablative armor bullshit like you see in Battletech. The armor
| ether works and you get no damage or it gets penetrated and
| you get full damage.
| btilly wrote:
| Playing around with a somewhat similar mechanic lead to me
| proposing https://projecteuler.net/problem=240.
| Straw wrote:
| It's called the generalized mean:
|
| https://en.wikipedia.org/wiki/Generalized_mean
| dahart wrote:
| Ah yes, this is the functional definition of the min/mean/max
| continuum, thanks! So does this have applications in
| statistics, and is it ever used to produce a distribution of
| random variables?
| keithalewis wrote:
| Front page material? P(max{X_1, X_2} <= x) = P(X_1 <= x, X_2 <=
| x) = P(X_1 <= x) P(X_2 <= x) = xx. P(sqrt(X_3) <= x) = P(X_3 <=
| x^2) = x^2. It is late in the day when midgets cast long shadows.
| refulgentis wrote:
| I felt the same way, came here to decide whether to comment
| something negative, saw your comment was just posted. But I
| first read the top comment from 2 hours ago, apparently this is
| news-ish to stats people because it's counterintuitive to
| common methods? _shrug_
| prof-dr-ir wrote:
| If X1...Xn are independently uniformly distributed between 0 and
| 1 then:
|
| P(max(X1 ... Xn) < x) =
|
| P(X1 < x and X2 < x ... and Xn < x) =
|
| P(X1 < x) P(X2 < x) ... P(Xn < x) =
|
| x^n
|
| Also,
|
| P(X^{1/n} < x) = P(X < x^n) = x^n
|
| I guess I am just an old man yelling at clouds, but it seems _so_
| strange to me that one would bother checking this with a
| numerical simulation. Is this a common way to think about, or
| teach, mathematics to computer scientists?
| coliveira wrote:
| > it seems so strange to me that one would bother checking this
| with a numerical simulation
|
| I believe that some people know programming but have little
| experience with mathematics, so the first thing they'll think
| about is to "check" numerically that something is true. Which
| in reality doesn't prove anything, so people should better
| spend the time to learn some math for these situations.
| ValentinA23 wrote:
| "you can't learn maths on your own, you need a master"
|
| My math teacher during my second year in university, who also
| happened to be a chaos theorist working on cool stuff such as
| cryptography via chaos synchronization.
|
| He was by far the worst teacher I ever had in terms of mental
| calculation abilities, but he was also the more advanced. I
| remember a conversation where he explained how he would
| always implement his algorithms at least twice, on entirely
| different software and hardware stacks.
| mistercow wrote:
| I have, on many occasions, thought that I had an analytical
| solution to a problem pinned down, then checked it
| numerically and found that I'd made a mistake. It seems weird
| that there's any hostility towards a perfectly useful tool
| for checking your work.
| Vinosawd wrote:
| Similarly,
|
| P(min{X1, X2, ..., Xn} < x) =
|
| P(X1<x or X2<x ... or Xn < x) =
|
| P(not(not(X1 < x) and not(X2 < x) ... and not(Xn < x))) =
|
| 1-P(not(X1 < x) and not(X2 < x) ... and not(Xn < x)) =
|
| 1-P(not(X1 < x))[?]P(not(X2 < x)) ... [?]P(not(Xn < x)) =
|
| 1-(1-P(X1 < x))[?](1-P(X2 < x)) ... [?](1-P(Xn < x)) =
|
| 1-(1-x)^n
|
| which curve, in the [0, 1]^2 square, is just x^n rotated around
| (1/2; 1/2) by 180 degrees.
| cowsandmilk wrote:
| As a mathematician, one of the first programs I wrote was to
| numerically calculate pi by random number generation in a box
| and seeing percentage of points that were in the circle. It was
| a fun introduction to programming. So, I found it to be the
| opposite, numerical simulations were a way to teach
| mathematicians programming.
| tedunangst wrote:
| Simulations can give answers to problems that don't have
| analytical solutions, and it eliminates one step from the
| decision tree.
| Gunax wrote:
| Thanks! This is helpful.
| mturmon wrote:
| I think OP just kind of enjoys these little simulations. It's
| rewarding (to some) to see mathematical predictions actually
| work out.
|
| As a probability nerd myself, I was yelling at my browser for
| him to take the difference between the true CDF and the
| empirical CDF. I.e., not just the plot where "analysis" CDF
| overlaps empirical CDF, but the difference between the two,
| scaled up by some number...say, the square root of the number
| of samples? ;-)
|
| Then we would have a realization of a discretized Brownian
| bridge, a kind of rescaled Brownian motion. And _then_ we could
| have all kinds of fun looking at where the maximum difference
| falls (it will usually not be near the endpoints), and the size
| of the set adjacent to the maximum, and the local behavior of
| the process around the maximum (it's expectation should be
| "cusped", not smooth, although other processes will be smooth
| there).
|
| Some of those topics are really rather advanced, and they are
| all accessible by simulation if you follow your nose.
| mistercow wrote:
| The point of running numerical simulations is that when they
| come out wrong, you learn something. If you simulate this, for
| example, and get a different answer, you've learned that you've
| misunderstood the claim.
|
| In other cases, a numerical simulation giving a wrong answer
| can quickly tell you that your apparently valid reasoning
| contains a mistake. That's really useful, because subtle
| reasoning errors are really easy to make, and math is full of
| fun false proofs.
|
| A wrong simulation is strong evidence that you've misunderstood
| something, and so by necessity, a correct simulation is
| (weaker) evidence that you've understood correctly.
| gxs wrote:
| Just a side comment on what a great little video.
|
| Short, to the point, and the illustrations/animations actually
| helped convey the message.
|
| Would be super cool if someone could recommend some social media
| account/channel with collections of similar quality videos (for
| any field).
| ajot wrote:
| Well, that YouTube channel, 3Blue1Brown, is amazing. You'll see
| lots of great explanations with this kind of animations there.
___________________________________________________________________
(page generated 2024-12-01 23:01 UTC)