I'm trying to do a Welch's t-test of two sample groups which turn to have estimated variance equal to 0.  As could be seen from wikipedia page of Welch's t-test: , the formula for calculating the t-stat:  $$ t= \frac{\overline X_1 - \overline X_2}{\sqrt{\frac{s_1^2}{N_1} +\frac{s_2^2}{N_2}}} $$  contains 0 at the denominator and the t-stat could not be calculated (obviously my C++ program retuns me a NaN value...)  I need a way to handle this an calculate the t-test anyway, could you tell me how to proceed in these cases?
The formula for a one sample t-test, as given by  is  $t = \dfrac{\bar{x} - \mu_0}{s\big/\sqrt{n}}$  However, in this equation, if the sample standard deviation, $s$, is zero, $t$ will be undefined. Is there any reasonable way to get a $t$ value in this case?
I asked a question that has been marked as a duplicate. I read a lot of similar questions and explanations in advance but I couldn't find a solution. In the question that should answer my question the asker used a different (not working) approach. There is even an answer that would work for my case however I'd rather consider it as a workaround than a solution since I have seen examples using my approach.  So I would like your opinion in that case. Would it be ok to repost my question while explaining why other answers didn't help me? I edited my question but I think it's not getting any attention anymore. Naturally I will remove the old question. I am planning to travel to India (COK airport, Kerala) from United States. I want to take my laptop as well as my tablet (iPad). Am I allowed to take both in my backpack with my documents related my work. I think I am allowed to take only one computer as per the rule. Will the customs consider my iPad as a computer?  What all I can take?   One of my friends took 2 laptops (1 work and 1 personal) and had trouble at the airport.  Also I am planning to take some wristwatches (7 of them, each avg price is 45 $). I read in a website that I can take stuff up to max 35000 INR. Is that true? In that case, how will I manage my stuff? SQL command based on PHP strstr or LIKE Using ls to find files that end in a character, ignoring extension I am supposed to use ls to find files that end in a certain letter, but it does not matter if the file has an extension or not.  For example, I want it to do this  &gt; ls test test.txt test.ascii other.txt  &gt; ls [something] test test.txt test.ascii  So that I can find files that end with a 't', but it doesn't include the file where the extension ends in t  Edit: I am supposed to assume that the only period characters in the filename will be for the extension and there will be no others Weird http -> https redirection although not configured I am running Apache 2.2.15 (CentOS 6.6) with a HTTP-only domain   demo.xml-director.info  Using wget I can retrieve the content properly   wget -S http://demo.xml-director.info --2015-01-05 13:31:41--  http://demo.xml-director.info/ Resolving demo.xml-director.info (demo.xml-director.info)... 176.9.146.28 Connecting to demo.xml-director.info (demo.xml-director.info)|176.9.146.28|:80... connected. HTTP request sent, awaiting response...    HTTP/1.1 200 OK   Date: Mon, 05 Jan 2015 12:31:41 GMT   Server: Zope/(2.13.22, python 2.7.6, linux2) ZServer/1.1   Content-Length: 20227   Expires: Sat, 01 Jan 2000 00:00:00 GMT   Content-Type: text/html;charset=utf-8   X-Ua-Compatible: IE=edge,chrome=1   Content-Language: en   Vary: Accept-Encoding   Keep-Alive: timeout=15, max=100   Connection: Keep-Alive Length: 20227 (20K) [text/html] Saving to: 'index.html.4'   However Chrome/Firefox always change the request from http to https because of HTST. However for this particular domain there is no HSTS configured.  The server runs SSL for www.xml-director.info with enabled HSTS support. However there is further alias here that would map demo.xml-director.info to www.xml-director.info.   How can this problem be resolved.  VHOst for www.xml-director.info:  &lt;VirtualHost *:443&gt;     ServerName www.xml-director.info     ServerAlias xml-director.info      SSLEngine on     SSLCertificateFile /etc/httpd/certs/15742445repl_2.crt     SSLCertificateCHainFile /etc/httpd/certs/15742445repl_2.ca-bundle     SSLCertificateKeyFile /etc/httpd/certs/zopyx.com.key      CustomLog /var/log/httpd/xml-director.info.log combined     DocumentRoot /var/www/xml-director/landing-v1      Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains"      &lt;location "/"&gt;         Options +Indexes         Header set Access-Control-Allow-Origin "*"         Header set Access-Control-Allow-Methods "GET,PUT,POST,DELETE"     Header set Access-Control-Allow-Headers "X-Requested-With,Content-Type"     &lt;/location&gt;  &lt;/VirtualHost&gt;  &lt;VirtualHost *:80&gt;     ServerAlias www.xml-director.com      ServerAlias www.xml-director.info     ServerAlias www.xml-director.de     ServerAlias xml-director.com     ServerAlias xml-director.info     ServerAlias xml-director.de      RedirectPermanent / https://xml-director.info/ &lt;/VirtualHost&gt;   and for demo.xml-director.info  &lt;VirtualHost *:80&gt;     ServerName  demo.xml-director.info     RewriteEngine On      RewriteRule ^/(.*) http://127.0.0.1:12020/VirtualHostBase/http/demo.xml-director.info:80/xml-director/VirtualHostRoot/$1 [L,P]     RewriteRule ^/$    http://127.0.0.1:12020/VirtualHostBase/http/demo.xml-director.info:80/xml-director/VirtualHostRoot/$1 [L,P]      CustomLog /var/log/httpd/demo.xml-director.info.log combined     AddOutputFilterByType DEFLATE text/html text/xml text/plain text/css text/javascript      CacheRoot /tmp/cache     CacheEnable disk /     CacheIgnoreCacheControl on      KeepAliveTimeout 15     KeepAlive on      ExpiresActive On     ExpiresByType image/gif "access plus 10 day"     ExpiresByType image/jpg "access plus 10 day"     ExpiresByType image/jpeg "access plus 10 day"     ExpiresByType image/png "access plus 10 day"     ExpiresByType text/javascript "access plus 10 day"     ExpiresByType text/html  "access plus 1 hour"     ExpiresByType text/html  "access plus 1 hour"     ExpiresByType text/css  "access plus 10 days"      &lt;Location "/"&gt;         Order allow,deny         Allow from all     &lt;/Location&gt;  &lt;/VirtualHost&gt; Look at the profile page of , who has just "lost" 100k reputation and all their bronze badges, because of this broken design.  Shouldn't the primary usercard be kept intact no matter how other elements grow?  P.S. So many design bugs these days, did SE do a large CSS refactory?  P.P.S  that squeezes the right pane ( to reproduce) Let $G$ be a finite abelian group, then $G$ has a subgroup of order $n$ if and only if $n\mid G$.  Proof: by Lagrange if $H\leq G$ then $|H|$ divides $|G|$ so this proves one of the implications.  We prove the other implication by strong induction on the order of $G$, for primes this is just Cauchy, so we can take these like base cases. Now let $n$ be a proper divisor of $|G|$, take $p$ a prime in the factorization of $|G|$ (instead of $|G|$ is should be $n$, I had made a mistake when typing the first time), then by cauchy there is an element $x$ of $G$ of order $p$, since $G$ is abelian $\langle x\rangle$ is normal in $G$ so we can look at the quotient group $G/\langle x\rangle$, this group has order $\frac{|G|}{p}$, now take a prime $p_1$ in the factorization of $\frac{|G|}{n}$. By induction the quotient group has a subgroup $E$ of order $G/pp_1$ now look at the preimage of $E$ under the natural homomorphism from $G$ to $G/\langle x\rangle$, it is easy to see this is a subgroup of $G$, we call it $I$, consider the restriction of the natural projection to $I$, this is a surjective homomorphism from $I$ to $E$ with kernel $\langle x\rangle$ so by the first isomorphism theorem $I/x\cong E$ so $\frac{|I|}{|\langle  x\rangle|}=|E|\implies  |I|=\frac{|G|}{pp_1}{p}=\frac{|G|}{p_1}$ Notice $\frac{|G|}{p_1}$ is a multiple of $n$ since $p_1$ was in the fatorization of $\frac{|G|}{n}$. So by induction $I$ has a subgroup of order $n$ which is also a subgroup of $G$. How to find the roots of $x^4 +1$ I'm trying to find the roots of $x^4+1$. I've already found in this site solutions for polynomials like this $x^n+a$, where $a$ is a negative term. I don't remember how to solve an equation when $a$ is a positive term as the equation above.  Thanks Let us say I have added a PPA that has X package that I want but it also has Y package that I do not want to use or receive updates from. How can I, from the same PPA, receive updates for a specific package but deny updates from the same PPA for other packages.  A step by step example would be good since this has happened to me in several PPAs that have a particular package I want but also add a whole bunch of others that I do not yet want to update. Prove that there are $p+1$ points on the elliptic curve $y^2 = x^3 + 1$ over $\mathbb{F}_p$, where $p > 3$ is a prime such that $p \equiv 2 \pmod 3$. Let $p &gt; 3$ be a prime such that $p \equiv 2 \pmod 3$. Define the elliptic curve $E$ over $\mathbb{F}_p$ by $y^2 = x^3 + 1$. Prove that $E(\mathbb{F}_p)$ consists of $p+1$ points.  Using Fermat's little theorem you can prove that $x^3 + 1$ is a bijection on $\mathbb{F}_p$. Hence, $$\#E(\mathbb{F}_p) = \#\{(x,y) \in \mathbb{F}_p^2 : y^2 = x^3 + 1\} + \#\{\infty\} = \#\{(x,y) \in \mathbb{F}_p^2 : y^2 = x\} + 1.$$ But then I am stuck trying to prove that $y^2 = x$ has $p$ solutions $(x,y) \in \mathbb{F}_p^2$. #!/bin/bash - no such file or directory What is the integral of 1/x? What is the integral of $\frac{1}{x}$? Do you get $\ln(x)$ or $\ln|x|$? In general, does integrating $f'(x)/f(x)$ give $\ln(f(x))$ or $\ln|f(x)|$? Also, what is the derivative of $|f(x)|$? Is it $f'(x)$ or $|f'(x)|$? I have noticed a couple of kinds of behavior that seem to crop up in the SO community, and it really seems to artificially boost reputation. There may not be a solution (or it may not be a problem!) but here are some thoughts.  The first is the fact that "celebrity" users, or users with lots of reputation, are treated significantly better than others. Take Joel Spolsky's most recent question:    It was closed, opened, closed, and re-opened. And the question has earned Joel - what - 1030 reputation 103 votes, and lots of reputation! Wow! I'm not saying that Joel's question is a bad one. But lets compare to other questions that one might consider to be in the same equivalence class - easily answerable, specific questions, short questions:   (5 votes)   (5 votes)  If you look at the , I can hardly find any which are specific technical questions. So that Joel's question was so upvoted could only mean that:   It was upvoted based on his celebrity People have been interpreting the questions as a sort of zen-like wakeup call, designed to get people talking and thinking about they way they vote.   I do not mean any disrespect toward Joel, and again, I think his question was a good one. This post isn't about Joel! But the boost in reputation did not (imho) mean "Joel is really good at programming, and he has earned my trust as someone knowledgeable about computers." It may be true that Joel is a proficient computer expert, but not based on the merit of that one question.  Which leads me to an example about myself. I recently gave  (130 reputation) to a question about PHP's image-creating libraries. I am very appreciative of the community's support for my answer - an answer which I believe was well-thought and that I put effort into.  At the same time I can't look someone and tell them, with a straight face, that my reputation is a great reflection of my computer-related knowledge. Billions of people on the net have created tutorials for PHP's GD image library - I just happened to be the person to post a few of them. Heck if I know why it got 13 votes! (oh, but please don't downvote it!!)  SO is built by the community - so the community absolutely gets to decide what questions are important, and how they choose to dispense reputation. But in practice, I feel like peoples' reputation would be much lower if the community were more discriminating about the way they voted.  So: am I totally off base here? Is this even something that can be corrected with a different reputation algorithm? Or am I the only one who sees this as a detriment to the SO community?  (And, to be completely clear, I do not intend for this to be an ad hominem, and I am not jealous about not having a higher reputation. But I do take reputation with a grain of salt, in part for these reasons, and I thought I'd bring it up! It is meta, after all!) What is the difference between fixed effect, random effect and mixed effect models? In simple terms, how would you explain (perhaps with simple examples) the difference between fixed effect, random effect and mixed effect models? Proving the Lorentz invariance of the Lorentz invariant phase space element I have been looking around for a satisfactory answer to prove that  $$\frac{d^3\vec{p}}{2E_{\vec{p}}}$$  where $E_{\vec{p}}=+\sqrt{(|\vec{p}|c)^2+(mc^2)^2}$, is Lorentz invariant. The standard answer seems to be that the above measure is equal to  $$d^4p \, \delta (p^2-m^2)\theta(p_0)$$  where $p^2=p_0^2-|\vec{p}|^2$, and $\theta(x)$ is the step function. I understand these two are equivalent, but I don't understand why the second has to be Lorentz invariant, in particular why the Dirac delta has to be Lorentz invariant. I have found a  (section 2.1) that proves that $\delta^{(4)}(p-p')$ is Lorentz invariant, but I can't find a way to extend their method successfully here. In fact, all I can seem to get tells me the above isn't Lorentz invariant, and that in fact it should transform to   $$\frac{d^3\vec{p}'}{2\gamma E_{\vec{p}'}}$$  which makes sense from $d^4p$ being Lorentz invaraint and $dp_0$ transforming proportional to $\gamma$, but it isn't what everyone else says. What's the problem here?    An alternative way to "derive" the factor of $1/\gamma$:  $$\delta (p^2-m^2)\theta(p_0)=\frac{1}{E_{\vec p}}\delta(p_0-E_{\vec{p}})$$  Now, as $dp_0$ transforms to $\gamma dp_0$, the $\delta(p_0-E_{\vec{p}})$ should transform to $\gamma^{-1}\delta(p_0-E_{\vec{p}})$, as can be shown with an analogous argument to the one shown in the . The $E_{\vec{p}}$ also transforms to $\gamma(E_{\vec{p}}-v p_x)$ for an $x$-boost, but this doesn't seem to solve it. This equation is directly given in my book and I am don't know anything about its proof.I tried L'Hospital rule by differentiating the both numerator as well as denominator(division rule), but the result is still coming in indeterminate forms.I am a beginner , and haven't practiced limits that much. This formula is really confusing me. Label equations arbitrarily When I have equations, as in  \begin{equation} ... \end{equation}   Can I arbitrarily assign the numbers to the equations? Instead of the usual order (1), (2), (3), ..., I'd like something like (1), (2.1), (2.2), (2.3), (3.1), (3.2), (4), ... Maximum power transfer proof I have the following homework problem.  Consider a power supply with fixed emf $ε$ and internal resistance $r$ causing current in a load resistance $R$. In this problem, $R$ is fixed and $r$ is a variable. The efficiency is defined as the energy delivered to the load divided by the energy delivered by the emf.  When the internal resistance is adjusted for maximum power transfer, what is the efficiency?  The answer is 50% but I'm confused how this is calculated. Here is my thought process so far.  The power dissipated in the load is $I^2R$ and $\displaystyle I = \frac{ε}{r+R}$ so $\displaystyle P = \frac{ε^2R}{(r+R)^2} = \frac{ε^2}{\frac{r^2}{R} + 2r + R}$ and so power transferred to the load will be maximum when $\displaystyle \frac{r^2}{R} + 2r + R$ is a minimum. Taking the first derivative $\displaystyle \frac {d}{dr}(\frac {r^2}{R} + 2r + R) = (\frac{2r}{R} + 2)$ and this equals 0 when r = -R. The second derivative is $\displaystyle \frac{2}{R} &gt; 0$ so this point would be a minimum and therefore max power transferred when r = -R.  But having $r = -R$ doesn't make sense to me. From what I read, for maximum power transfer $r$ should equal $+R$. So I've probably done something wrong in my calculations or assumptions in the previous paragraph. Also wouldn't max power be transferred when the internal resistance is as close to zero as possible?  Can someone please show me a proof that shows why $r = R$ for max power transfer and then how to calculate the efficiency. Let G be a finitely generated abelian group and M a compact manifold,  I want to prove that $H_r(M,G)$ is finitely generated for $r\ge 0 $.  First I was thinking if  I could do induction over $r$ because for $r=0$, $H_0(M,G) \cong \bigoplus_{i=1}^nG$ where $n$ denotes the number of connected components of M.But for $r&gt;0$ I can't see a way to relate $H_r(M,G$) and $H_{r+1}(M,G)$.  Then I tried to use the fact that for every compact surface there exists a finite cover $\{A_i\}_{i=1}^m$ such that the finite intersections of $A_i$'s are contractile.Let $\{A_i\}_{i=1}^m$ such cover for $M$.Then,using induction on $m$, we have :  -For $m=0$, $M$ is contractile and $G$ finitely generated then $H_r(M,G) $is finitely generated.  -For $m=r$ it's true by induction hypothesis.  -For $m=r+1$ now putting $A_{r+1}=B$ and $\cup_{i=1}^r A_i=A$, and using Mayer Vietoris we get:  $$ ...\rightarrow H_{r+1}(A\cap B,G)\rightarrow  H_{r+1}(A,G) \oplus H_{r+1}(B,G) \rightarrow H_{r+1}(M,G)\rightarrow H_{r}(A\cap B,G) \rightarrow...$$   Here I don't know what to do, maybe I'm missing some algebraic argument It's easy to see that $H_{r+1}(A\cap B,G)$ and $H_{r+1}(A,G) \oplus H_{r+1}(B,G)$ are finitely generated.But how can I argue that $H_{r+1}(M,G)$ is finitely generated? Any idea would be aprecciated. Starters on Stack Overflow tend to lose interest as soon as their first question starts getting downvotes. Their first question also sometimes gets closed because it was either not framed properly or it missed some very common things.  There should be way to cope with this for instance give some starter bonuses to new users.