Why does the linear regression algorithm assume the input residuals (errors) to be normal distributed?
How does linear regression use the normal distribution?
Near-universally applicable alternative to "sanity check" The phrase "sanity check" is  as it implies that there is something wrong with people who have mental illnesses and the word "sanity" has been used to discriminate against such people.  Therefore, it should should be avoided.  What is a better alternative in the context of software?  Example usage:     _: if this is not what it should be, we have memory corruption (a fatal   error) and should terminate the program. This post is in reference to the following blog post:   To start off, a quick introduction of myself; my name is Jascha Drel, Product Manager for Advertising at Stack Overflow. In this role, I am part of ’s organization.   Our team is continuously making improvements to the ads experience on our sites. One of the changes we’re excited about sharing is the new Report this Ad feature now available on some of our sites. We want to continue to give our communities more native control over their ad experience. We needed a quantifiable way to receive feedback and this feature will allow that.  We enforce strict  on the types of advertisers we work with but cannot fully control what is shown due to how advertising delivery works. However, being able to hear from our users about problematic ads will be a huge benefit as we can address those problems faster and with more accuracy. The Report this Ad feature will allow us to quickly see and investigate ads reported by you which matters to us because we want to hear your thoughts.  Furthermore, this new feature ensures that the members of our communities have a built-in way to report ads they consider problematic when we test any new ad formats/solutions.  We are launching this feature on 5 sites initially (, , , , and ) to get a good understanding of what we can expect in terms of numbers of reports whenever launching this to the entire network. Prior to launching it network-wide, we’ll share general results we’ve seen here.  What happens once an ad is reported?  All reports will be consolidated into a dashboard that the team will look at several times per week to spot irregularities in terms of the total number of reports, report categories, and on an advertising campaign basis. We will not be replying to individual reports, but we will reach out to our advertisers, to share feedback or notify them if the ad being reported does not fit our guidelines. We may also evaluate our policies in response to large numbers of reports not covered by them. Since we don’t have a baseline for the number of ads that are going to be reported using this new feature, we will consider reevaluating the process if the current process doesn’t scale.    We’d like to share an update on the progress of this feature:   We've launched this feature on 5 SE sites (Server Fault, Database Administrators, Arqade, Game Development, and Unix &amp; Linux) initially for logged in users only, and for anonymous users afterward. The report this ad button was shown several million times (of which roughly 65% paid ads and 35% house ads). We showed several dozens of different ad campaigns. So far we have received 0 reports. We've tested the feature several ways, found some minor bugs (which have been/are being fixed), however, in the vast majority of the scenarios the feature works well (we’re happy to be ).   We’re currently graduating this feature and are releasing it network-wide this week. Feel free to comment below if you have any questions/comments. Trying to get my head around the commutator subgroup. This is an excercise from Artin's Algebra:  Let $C$ be the commutator subgroup of $G$. Prove that $G/C$ is abelian.  Here is what I've done:  Let $xC,yC \in G/C$ then $xyx^{-1}y^{-1}C = C$ since $xyx^{-1}y^{-1}$ is a commutator hence belongs to $C$. But then $xyC = yxC$ so $xC$ and $yC$ commute in $G/C$. This can be done for any elements, so $G/C$ is abelian.  This seems somewhat surprisingly short. Is that all there is to it?   Regards From :  Error propagation It was common to discuss the &quot;error propagation&quot; properties as a selection criterion for a mode of operation. It might be observed, for example, that a one-block error in the transmitted ciphertext would result in a one-block error in the reconstructed plaintext for ECB mode encryption, while in CBC mode such an error would affect two blocks.  I read  similar post before. And I can understand that in CBC decryption, only two blocks are affected due to error propagation (error in 1 block). But, for the same case in CBC encryption, why are still only two blocks affected? It looks like all the following blocks will be affected. UnboundLocalError on local variable when reassigned after first use How do you make a torus 'telescope' open? Unix Truncate Column in csv file How do I survive in the Underworld? Prove that if $(ab)^i = a^ib^i \forall a,b\in G$ for three consecutive integers $i$ then G is abelian I've been working on this problem listed in Herstein's Topics in Algebra (Chapter 2.3, problem 4):     If $G$ is a group such that $(ab)^i = a^ib^i$ for three consecutive integers $i$ for all $a, b\in G$, show that $G$ is abelian.   I managed to prove it, but I'm not very happy with my result (I think there's a neater way to prove this). Anyway, I'm just looking to see if there's a different approach to this.   My approach:  Let $j=i+1, k=i+2$ for some $i\in \mathbb{Z}$.  Then we have that $(ab)^i = a^ib^i$, $(ab)^j = a^jb^j$ and $(ab)^k = a^kb^k$.  If $(ab)^k = a^kb^k$, then $a^jb^jab =a^jab^jb$.   We cancel on the left and right and we have $b^ja = ab^j$, that is $b^iba = ab^j$.  Multiply both sides by $a^i$ on the left and we get $a^ib^iba = a^jb^j$, so $(ab)^iba = (ab)^j$. But that is $(ab)^iba = (ab)^iab$.   Cancelling on the left yields $ab=ba$, which holds for all $a,b \in G$, and therefore, $G$ is abelian.  Thanks! Are comments on answers to my question supposed to show up in my recent activity Find the angle ADE of the given triangle. Given :  Angle ABE = 50, Angle DAC = 20, Angle BAD = 60, Angle ACB = 20 and Side CD = Side DA.Unit of angle values given is degree.  Find : Angle ADE.    I'm stuck and I need help here. I have a Python script which takes as input a list of integers, which I need to work with four integers at a time.  Unfortunately, I don't have control of the input, or I'd have it passed in as a list of four-element tuples.  Currently, I'm iterating over it this way: for i in range(0, len(ints), 4):     # dummy op for example code     foo += ints[i] * ints[i + 1] + ints[i + 2] * ints[i + 3]  It looks a lot like &quot;C-think&quot;, though, which makes me suspect there's a more pythonic way of dealing with this situation.  The list is discarded after iterating, so it needn't be preserved.  Perhaps something like this would be better? while ints:     foo += ints[0] * ints[1] + ints[2] * ints[3]     ints[0:4] = []  Still doesn't quite &quot;feel&quot; right, though.  :-/ Related question: Why are we scared of singularities? I often hear people say that general relativity predicted its own demise because of the singularities it predicts. If I'm not mistaken, this is also a problem in QFT. I wonder why singularities garner so much hate. To me, it seems like negative or complex numbers: we used to hate these things but now they are more generally accepted. Why can't it be that nature just has singularities? We might not get it, we might not like it, but it may be so. Proving bessel identity $[J_0(x)]^2 + 2[J_1(x)]^2 + 2[J_2(x)]^2 + \cdots = 1$ and $|J_0(x)|\le 1$ The generating function for a Bessel equation is:      $$g(x,t) = e^{(x/2)(t-1/t))}$$      Using the product $g(x,t)\cdot g(x,-t)$ show that:      a) $$[J_0(x)]^2 + 2[J_1(x)]^2 + 2[J_2(x)]^2 + \cdots = 1$$      and consequently:      b)      $$|J_0(x)|\le 1, \forall x$$      c) $$|J_n(x)| \le \frac{1}{\sqrt{2}}; n=1,2,3,\cdots$$   For a) I tried the product:  $$e^{(x/2)(t-1/t))}\cdot e^{(x/2)(-t+1/t))} = 1$$  I at least arrived at the right side of the equation. Since this generates the bessel functions, I should arrive at something related to $J_n$ in the left side. I know that  $$e^{(x/2)(t-1/t))} = \sum_{n=0\infty}^{\infty} J_n(x)t^n$$  $$e^{(x/2)(-t+1/t))} = \sum_{n=0\infty}^{\infty} J_n(x)(-t)^n$$  but it's not just a matter of multiplying coefficients from the two infinite series, right?  For $b$, I tried to use  but it's not as obvious  I have no idea how to deal with $c$, could somebody help me? Forest tree not symmetric How do I get a list of installed files from a package? Zsh says "no matches found" when trying to download video with youtube-dl I downloaded youtube-dl using pip on CrunchBang (a Debian Wheezy distro). When I run   youtube-dl {video URL}   I get  zsh: no matches found: {video URL}   I guess it has something to do with zsh, because I found some users on Arch forums complaining about it. When I switched to bash it worked. I am trying to help a friend who is very concerned that she has just lost all of the data on her 32GB SanDisk microSD card.  I told her I would post this and see if anyone could offer help.  Here are the details:   The SanDisk microSD card is less than two years old.  Probably only about a year old.  The store will take it back, but that doesn't really help.  She wants her data. She used the card in her Samsung Galaxy S4 smartphone for over a month.  The phone was never exposed to water or temperature extremes. Today, her phone suddenly said something like "Your SD card is blank or an unsupported format". Her phone was then unable to read the SanDisk microSD card at all.   Here's what she has tried:   Rebooting her phone.  Had no effect. Taking out the SanDisk microSD card and putting it inside a full-size SD card adapter, and inserting it into a Windows 7 SP1 computer.  The computer did not recognize its presence at all. Putting the SanDisk microSD card into a USB 2.0 external card reader and inserting the card reader into a USB port on a Windows 7 SP1 computer.  The computer recognized the card reader and installed drivers for it.  The card reader shows up as 'Removable Disk' in Windows Explorer.  Clicking on 'Removable Disk' in Windows Explorer results in the error "Insert disk: Please insert a disk into the Removable Disk". After trying #3, tried opening the 'Removable Disk' in FreeCommander.  Doing so results in the error "The device is not ready".   She does not have access to a linux box, but does have access to her Android phone.  What can she do to recover the data on her 32GB SanDisk microSD card? Comprehensive Rules for Game of Thrones Lines of Succession I'm three quarters through the third book, "Storm of Swords" right now (so please, no spoilers from too late in the book or any subsequent books).  I just read a part where Tyrion is discussing with Prince Oberyn and they mention the difference between Dornish law and Westerosi law in Line of Succession (ie women can rule under Dornish law).  I'm a little confused trying to puzzle out what the exact LOS rules are.  At first I though it was: at the moment a king/lord dies, to find who holds the title next, you do a depth-first search down the family tree starting with the oldest sibling (ignoring anyone who isn't true-born or has given up their claim ie as Night's Watch or Kingsguard etc.).  Then, for Dornish law you take the first living person and for Westerosi law the first living male person found in this way (so succession can pass through a woman in both cases, but only Dornish law actually allows them to claim the title). If there are no valid living heirs, then you work backwards along the paternal line until you find an ancestor who has living heirs and start from them.  But there were various references to if Sansa's brothers were all dead, then her child would claim Winterfell.  It seems to me that that's only true if somebody else doesn't get it first.  In other words, if Sansa's brothers are killed before she has a child (even if she's already married), doesn't that mean Winterfell would pass to the nearest cousin along her father's line (whomever that may be)?  And then because that cousin has already held Winterfell, when they die the next in the line of succession starts from them so Sansa's children's family would not have claim to Winterfell again unless that cousin has no valid heirs.  What am I missing here? Is there some exception?  Are there no valid cousins? In how many ways can the letters of the word CHROMATIC be arranged?