TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Mathematical Notation Is Awful

69 点作者 blackhole将近 9 年前

29 条评论

chilie将近 9 年前
These are just issues that someone unfamiliar with a field would face. None of them are problems for those of us in the field.<p>First, the expectation thing. He&#x27;s using a special case, E(X), and complaining that the more general case doesn&#x27;t follow the general case. It&#x27;s like saying &quot;Well the plural of mouse is mice but the plural of house isn&#x27;t hice!&quot;. The general definition of expectation (for a discrete probability) is<p>E(f(x)) = sum f(x_i)* p(x_i)<p>If you start with this general definition, both E(X) and E(X^2) are perfectly natural. The author&#x27;s error of starting with the special case in no way implies an issue with notation.<p>And how is the fact that Wikipedia is inconsistent between E(X) and E[X] in any way mathematical notation&#x27;s fault? If you read a novel that starts using &#x27; for quotes and switches to &quot;, that&#x27;s an issue with the novel (assuming its not stylistic) and not an issue with the typography in general.
评论 #12196424 未加载
评论 #12196440 未加载
评论 #12196446 未加载
评论 #12196545 未加载
评论 #12197260 未加载
评论 #12196441 未加载
评论 #12196488 未加载
评论 #12196500 未加载
评论 #12196456 未加载
评论 #12205338 未加载
jamessb将近 9 年前
I think the fundamental source of confusion might be due to not understanding the concept of a random variable. In his example, X is a random variable; the expectation E[X] is an <i>functional</i> applied to its probability mass function. Given this, it should not be surprising if it seems to behave differently to &quot;any other function, in math&quot;.<p>If you understand this, I think the notation is natural:<p>We have a random variable X, which takes value x_i with probability p(x_i). Thus, the random variable X^2 will take value (x_i)^2 with probability p(x_i).<p>Given that the expection for the random variable X with p.m.f p(x_i) is defined as E[X] = \sum x_i p(x_i), it should be clear that to obtain the expectation of any random variable we must sum over the product of (value) and (probability of that value). It should also be clear that this gives E[X^2] = \sum (x_i)^2 p(x_i)<p>I&#x27;m confused by his comment that: <i>p(xi) isn&#x27;t, because it doesn&#x27;t make any sense in the first place. It should really be just PXi or something, because it&#x27;s a discrete value, not a function!</i><p>The probability mass function <i>is</i> a function: for a given value, it gives the probability that the the discrete random variable takes that value. To calculate the expectation we use the values obtained by evaluating the function at discrete points, but what else could we do?
评论 #12196474 未加载
markhkim将近 9 年前
If you think probability theory is bad...<p>The old joke that &quot;differential geometry is the study of properties that are invariant under change of notation&quot; is funny primarily because it is alarmingly close to the truth. Every geometer has his or her favorite system of notation, and while the systems are all in some sense formally isomorphic, the transformations required to get from one to another are often not at all obvious to the student. —John M. Lee, &quot;Introduction to Smooth Manifolds&quot;
gnuvince将近 9 年前
I started doing a lot better in calculus when I started using longer notation (e.g. f = x -&gt; x³ instead of f(x) = x³) and making sure that things &quot;type checked&quot;. For instance, this tendency to use f(x) to refer to a function, rather than just f, was very confusing to me, because f(x) is an element of the co-domain while f is a function (typically from real to real in my undergrad classes). I had to figure this out by myself because the textbook I was using and the prof all went with the notation that wouldn&#x27;t type check. When I finally realized that dy&#x2F;dx should instead be (d&#x2F;dx)(f), things started being a lot clearer to me: derivation takes a function and returns a function and f is a function so everything checks out.
评论 #12197022 未加载
mrottenkolber将近 9 年前
This a thousand times. I boycott math notation. My most memorable math moments are:<p>- giving a talk on notation in high school (I was not tasked to do this, I decided to do it on my own) because I was FREAKED OUT by how we were using tons of symbols nobody had ever explained or defined<p>- converting all Math I encountered in University to Common Lisp programs to get rid of the shit notation<p>- bursting into crazy laughter when after five algebra lectures the prof notices that the students parse his notation differently than he does<p>Give it names, use S-Expressions.
评论 #12196561 未加载
评论 #12196416 未加载
评论 #12196427 未加载
评论 #12196662 未加载
yorwba将近 9 年前
I had an exam in probability theory yesterday, so these topics are still quite fresh in my mind. The confusion already starts when he uses the equation<p><pre><code> E[X] = \sum_{i=1}^{\infty} x_i p(x_i) </code></pre> for the expectation. In my class it was introduced as<p><pre><code> E[X] = \sum_{\omega \in \Omega} X(\omega) P(\omega) = \sum_{ x \in X(\Omega)} x p_X(x) </code></pre> which totally makes sense if you know that X is a function that assigns a value to each possible outcome. In most cases we don&#x27;t actually care about the outcomes, so there is the second description using p_X.<p>The subscript X is important to highlight that p is not just some arbitrary function, it is p_X, the probability mass function of X.<p>Now when you want to compute the expectation of X^2, you use<p><pre><code> E[X^2] = \sum_{\omega \in \Omega} X^2(\omega) P(\omega) = \sum_{x^2 \in X^2(\Omega)} x^2 p_{X^2}(x^2) </code></pre> i.e. the substitution he wanted to do actually works when you make the dependency of p_X on X explicit.<p>Now p_{f(X)} is not that easy to compute from p_X in general, because you have to account for multiple possible ways to reach the same value, e.g. x^2 = (-x)^2. For f(x) = x^2 we have<p><pre><code> p_{X^2}(x^2) = p_X(x) for x = 0 and = p_X(x) + p_X(-x) otherwise </code></pre> If f is more complex, there is a third way using<p><pre><code> E[f(X)] = \sum_{x \in X(\Omega)} f(x) p_X(x) </code></pre> which amounts to the same thing, but is usually easier to calculate.
bjornsing将近 9 年前
One interesting observation that popped into my mind when I read the OP: Mathematicians don&#x27;t write mathematical notation in papers&#x2F;books by hand anymore, they use a far more verbose language called LATEX.<p>Wouldn&#x27;t it be great if every time you saw a mathematical formula there was a little widget to push that would show you the &quot;source code&quot; in LATEX++, and LATEX++ was like LATEX but made up of stringently defined mathematical operations (like &#x27;\element_wise_multiplication&#x27; instead of &#x27;\plus_sign_with_circle_around_it&#x27;)? :D
评论 #12196412 未加载
评论 #12196414 未加载
评论 #12196435 未加载
bsaul将近 9 年前
I remember being so outraged when i was first introduced to derivative in high school... Seeing that they didn&#x27;t use the same notation nor exact same definition in my physics class and maths class, in the same year, that was making me absolutely furious...
billconan将近 9 年前
I have similar feelings with music notation too. we never applied our &quot;user experience&quot; standards to mathematical notation and music notation. If these things were invented today, we might come up with better ideas.<p>One painful experience I have reading math is telling which variables are &quot;vectors&quot; and which are &quot;scalars&quot;. another is the similar looks of certain greek characters and english characters, such as alpha and a.
评论 #12196548 未加载
johnhenry将近 9 年前
Somewhat related: <a href="https:&#x2F;&#x2F;aeon.co&#x2F;videos&#x2F;maths-notation-is-needlessly-complex-it-can-and-should-be-better" rel="nofollow">https:&#x2F;&#x2F;aeon.co&#x2F;videos&#x2F;maths-notation-is-needlessly-complex-...</a>
评论 #12196434 未加载
zimbatm将近 9 年前
If I could fix one things in Maths, it would be to introduce an explicit import statement. Right now it&#x27;s very hard to work back what the symbols mean in a specific context unless you&#x27;re familiar with the field.<p><pre><code> from url&#x2F;to&#x2F;geometric-algebra.pdf import X; </code></pre> I don&#x27;t mind the overloading too much and it would always be possible to alias symbols in case two or more fields are user together.
评论 #12197317 未加载
gerbilly将近 9 年前
Math notation is a language that evolved over centuries.<p>The English language isn&#x27;t consistent but we all seem to be able to use it to communicate here.<p>Same thing with maths. Some notations are holdovers from earlier eras, but we still introduce them to students in case the run into it in an older book (dx&#x2F;dy for example).<p>And maths isn&#x27;t just about computation. It&#x27;s also about expressing ideas, and sometimes that is easier when the notation isn&#x27;t rigidly &#x27;executable&#x27; as some posters here would have it.<p>This article also reminds me of: <a href="http:&#x2F;&#x2F;knowyourmeme.com&#x2F;photos&#x2F;582861-reaction-images" rel="nofollow">http:&#x2F;&#x2F;knowyourmeme.com&#x2F;photos&#x2F;582861-reaction-images</a>
paulpauper将近 9 年前
Leibniz&#x27;s notation is useful for the chain rule and change of variables for parametric based equations
评论 #12196396 未加载
hgibbs将近 9 年前
The post is a pretty childish rant. One of the great facets of mathematical writing (and not learning, unfortunately) is that you can explicitly define your own notation, and then use said notation whenever you want. The author even notes this in his final paragraph, but doesn&#x27;t seem to see it as an advantage of mathematical writing.<p>Prior to modern notation, mathematics was written out in english in full. What we have now is significantly better than what existed before modern mathematical shorthand.<p>Also, the expectation is an operator and not a &#x27;function&#x27; (in the sense that it does not take values in one of the canonical scalar fields e.g. R, C). The notation makes perfect sense in this setting. For example, the expression E[x^2] should be interpreted as E acting on the function x -&gt; x^2 and not on a number x.
nshm将近 9 年前
As a developer I&#x27;m not quite happy with a single-letter names. Of course it&#x27;s ok for minor local things to be named &#x27;x&#x27; but for more important values and functions there is no problem these days to have a readable names just like in software. So you could actually read of a paper without guessing and searching those epsilons, lambdas and cappas and cryptic symbols. Use expectation(x) instead of e(x), use mean(y) instead of \hat y and so on.
评论 #12198193 未加载
erdewit将近 9 年前
In my experience people that are very verbose, that talk or write at great length and with ease, tend to have a dislike for terse formulations. Sometimes to the point of being offended by it. Math is just about the ultimate in terse notation and perhaps the author is one of these verbose people.<p>The same thing can be seen with programmers: The verbose programmer writes a lot of lines of code and is proud of it, while the terse programmer is proud to remove or simplify code.
htns将近 9 年前
This is just really weakly argued. Firstly, the notation does use capital X and and lowercase x. You need to realize these are different. It&#x27;s not substitution to go from X^2 to x^2. Capital letters are not real numbers, and thus it&#x27;s a type error too. Secondly, if you are familiar with differentiation and integration, you are familiar with straight substitution not always being correct.
amelius将近 9 年前
One of the cool things of Mathematica is that it solves these problems. But the result is, unfortunately, somewhat more verbose.
k__将近 9 年前
their naming isn&#x27;t that good either.<p>All these words that are already used for other things.<p>Magma, ring, group, body, lense, optic...
评论 #12196350 未加载
jokoon将近 9 年前
Funny, I said the same about Andrew Ng&#x27;s ML course.<p>Ultimately, if what you&#x27;re teaching is going to end up in software, why use math at all? Use code or pseudo code. I don&#x27;t think it&#x27;s bad to just give the working algorithm without having to prove the math.<p>Really how many students will end up being computer scientists anyway, and research and write about new methods of doing AI, and do the actual math? So few. I guess that&#x27;s a simple criticism of academics.<p>It&#x27;s just easier to work with code than mathematical notation most of the time, in my view. You can&#x27;t replace math, of course, but when things are simple enough, it could be avoided. It&#x27;s a matter of making math accessible to the most people.<p>Code is amazing because a computer can check to see if it works. A computer doesn&#x27;t understand math.
评论 #12196627 未加载
krapht将近 9 年前
Domain-specific languages, notation, and vocabulary exist for many disciplines. They are for the benefit of experienced practitioners and allow them to express common concepts and ideas in a precise and concise fashion to those who have been also been trained in the art.<p>Sometimes jargon, abbreviations, and cryptic notation exist to artificially make it harder for outsiders to understand what&#x27;s going on, but the examples in this post don&#x27;t convince me. The true issue here is that the appropriate Wikipedia article has no link to the &quot;Simple English&quot; version.<p>Most humans are capable of using context to distinguish usage. Operator overloading in programming languages and in mathematics can be useful sometimes.
评论 #12196373 未加载
评论 #12196407 未加载
panic将近 9 年前
If you&#x27;re doing math, you need to be able to manipulate the symbols easily. These notations develop because they&#x27;re easy to work with: consistency is less important than brevity. Lambda calculus terms may be easier to read, but they&#x27;re much slower to write, and and they take up more space on the page or blackboard.<p>That said, once you&#x27;ve arrived at some kind of result, you could switch to a more consistent notation for explaining whatever you&#x27;ve found. It doesn&#x27;t necessarily have to be textual, either (see <a href="http:&#x2F;&#x2F;worrydream.com&#x2F;KillMath&#x2F;" rel="nofollow">http:&#x2F;&#x2F;worrydream.com&#x2F;KillMath&#x2F;</a>).
everyone将近 9 年前
I just thought.. It would be great to have a website where mathematical formulas are expressed as pseudocode.
Longwelwind将近 9 年前
&gt;Two, wikipedia refers to E(X) and E(Y) as the means, not the expected value. This gets even more confusing because, at the beginning of the Wikipedia article, it used brackets (E[X]), and now it&#x27;s using parenthesis (E(X)). Is that the same value? Is it something completely different? Calling it the mean would be confusing because the average of a given data set isn&#x27;t necessarily the same as finding what the average expected value of a probability distribution is, which is why we call it the expected value. But naturally, I quickly discovered that yes, the mean and the average and the expected value are all exactly the same thing! Also, I still don&#x27;t know why Wikipedia suddenly switched to E(X) instead of E[X] because it stills means the exact same goddamn thing.<p>IIRC, the mean is the particular case of the expected value where the transformation function is the identity function.<p>The general expression of the expected value, where f(x) is the probability density function and g(x) is the transformation function, is:<p>E[g(X)] = \int{g(x) * f(x) * dx}<p>Let g be the identity function (g(x) = x), then E[g(X)] is the mean.<p>For example, let&#x27;s say that you bet on a throw of dice such than you win 2$ if the result is odd, lose 3$ if the result is 2, and win or lose nothing otherwise. Here, the event X is the throw of dice: you have 6 possible outcomes. Your transformation function is the gain you get for each outcome, therefore g(x) is defined by:<p>1 -&gt; +2<p>2 -&gt; -3<p>3 -&gt; +2<p>4 -&gt; 0<p>5 -&gt; +2<p>6 -&gt; 0<p>Then, the expected value E[g(X)] can be calculated by summing all the g(x) multiplied by the probability p(x) for all x (all outcomes).<p>The first point of the article, in my opinion, is more about statistics than math in general, and I believe people find it weird because of the confusion between X and x, the former being a random variable associated with a distribution function, the ater being a value in the domain of X.<p>The second point of the article is just ease of notation. The derivative of a function doesn&#x27;t exist; a derivative is always made with respect to a variable (df&#x2F;dx), but if a function has only one variable, then the derivative of the function is defined as the derivative of the function with respect to the one and only variable and we don&#x27;t need to write this only variable (f&#x27;(x)).<p>You could always write the variables of a function (df(x, y, z)\dy instead of df&#x2F;dy), but that&#x27;s just a waste of time, specially when you have to write it for every line of the demonstration.
daniel-levin将近 9 年前
The problem here is <i>not</i> the notation. Mathematical notation is not perfect, and can sometimes be confusing. Let me say this in a minimally offensive manner, without being obfuscatory: the author of this piece does not understand the mathematics underpinning the notation he is using. The root cause seems to be the use of probability theory in a cookbook manner. It can hardly be surprising that confusion results.<p>The first example is a formula. An instance of magic, in the sense that you use it to compute, without knowing what it does. The $x_i$&#x27;s are not quantified. What are they? Are they real numbers? Matrices? Elements of some semi-group? How can you expect to understand the &quot;formula&quot; if the summand is not explained? At best, I can say that it is a formal sum of <i>something</i>. We can forget discussing convergence or it being well-defined. You can cook up arbitrarily &#x27;nice&#x27; notation. It won&#x27;t help. This notation is absolutely fine for someone who can infer that the support of the distribution of X is some denumerable set {x_i}, equipped with p.m.f. p.<p>A suitable definition of the expected value (as an operator) would have cleared up all the confusing with the variance and E[X^2] vs (E[X])^2. This confusion is not the notation&#x27;s fault. It is the user&#x27;s fault for not knowing what E[f(x)] means (for some appropriate meaning of the symbol f).<p>&gt;&gt; Only the first xixi is squared. p(xi)p(xi) isn&#x27;t, because it doesn&#x27;t make any sense in the first place. It should really be just PXiPXi or something, because it&#x27;s a discrete value, not a function!<p>Functions <i>are not</i> algebraic expressions by which we associate one real number with another. In fact, we call p(x_i) the <i>probability mass function</i>. It seems to be a common flaw in many undergrad programs. Formulas and functions are never made distinct. The vast majority of functions f : R -&gt; R do not admit an expression in a formula.<p>The example with the different notation for &quot;derivatives&quot; is a good non-example. The so-called Leibniz notation is used because it allows people to make statements with differential forms, without needing to invoke exterior algebra. If this is done correctly, statements such as &quot;dy = f&#x27;(x)dx&quot; can be made fully rigorous, if need be. Students are told that dy&#x2F;dx is not a fraction, and yet it is used exactly as though it were. This confuses people - because they don&#x27;t know what is going on. The dot-notation for derivatives is extremely useful in classical mechanics.<p>Notation is a clutch for succinct and meaningful writing amongst the initiated. One cannot expect to be able to use these tools without knowing what is going on, or by suspending a great deal of questions.<p>&gt;&gt; There must be other ways we can explain math without having to explain the extraordinarily dense, outdated notation that we use.<p>My final gripe with this post. We typically use clean and modern notation. It could be so much worse! Also, if we didn&#x27;t re-use symbols, then we would run out, very quickly. Mathematics exists independently of the symbols we use to communicate it.
arekkas将近 9 年前
when you post this on facebook your account will be blocked and you&#x27;re forced to download anti-malware from kaspersky. outlier detection at its worst
donorman将近 9 年前
Seems like you are talking more about statistal notation than mathematical notation. Imo the topic is a tad off.
donorman将近 9 年前
Seem like you are talking more about statistical notation than mathematical notation. Please correct me if I&#x27;m wrong, I just think the topic is a tad off.
efz1005将近 9 年前
Real maths is done either in books or papers, where the authors explain every bit of notation they will use. This is not the case in online resources, which is indeed a bad practice... But hey, don&#x27;t blame maths for that.<p>And regarding the &quot;understanding maths in terms of computer programs&quot;, sure that&#x27;s possible to do with _some_ topics, but you just can&#x27;t expect a computer to represent _every_ concept you&#x27;d like.
评论 #12196361 未加载