I have three replicates of an experiment which gives me ratios of the abundance of different peptides.  If I take the data for one peptide:  pep1 &lt;- c(4.3, 5.7, 6.3)   I can use a one-sample t-test to test the hypothesis that the ratio is different from 1:  t.test(pep1,         alternative=c("greater"),        mu=1,        paired=FALSE,        var.equal=FALSE,        conf.level=0.95)   output:  data:  pep1 t = 7.4818, df = 2, p-value = 0.0087 alternative hypothesis: true mean is greater than 1 95 percent confidence interval:  3.703107      Inf sample estimates: mean of x   5.433333    However if I try and apply this to the rows of a dataframe called peptides, where each row is a separate peptide, with three ratios:  t_test &lt;- function(x) p_val =  t.test(x,                                        alternative=c("greater"),                                       mu=1,                                       paired=FALSE,                                       var.equal=FALSE,                                       conf.level=0.95)$p.value  apply(peptides, 1, t_test)   I get the data are essentially constant error.  I don't understand! I think apply is doing what I want because if I substitute 't-test' for 'mean' then it does the correct calculations.   My aim is to get the p-values for each peptide and then adjust these for multiple comparisons.  I'm relatively new to R, and any advice would be very much appreciated!
R version 3.1.1 (2014-07-10) -- "Sock it to Me" &gt; bl &lt;- c(140, 138, 150, 148, 135) &gt; fu &lt;- c(138, 136, 148, 146, 133) &gt; t.test(fu, bl, alternative = "two.sided", paired = TRUE) Error in t.test.default(fu, bl, alternative = "two.sided", paired = TRUE) :  data are essentially constant   Then I change just a single character in my fu dataset:  &gt; fu &lt;- c(138, 136, 148, 146, 132)   and it runs...  &gt; t.test(fu, bl, alternative = "two.sided", paired = TRUE)      Paired t-test   What am I missing here?
Integral vanishes on all intervals implies the function is a.e. zero I am having trouble with the following problem:      $f:\mathbb{R}\to \mathbb{R}$ is a measurable function such that for all $a$:   $$\int_{[0,a]}f\,dm=0.$$   Prove that $f=0$ for $m$ almost every $x$ (here $m$ is the Lebesgue measure).    I have no problem proving this for $f$ non-negative, or under the assumption that $f$ is integrable. But the question only assumes that $f$ is measurable and no more.  My idea was the usual thing; we look at the set of points where $f$ is positive and negative and assume one of these has measure greater than zero. Then I wanted to estimate one of these by an open set, look at the integral on the open set and show that it had to be greater than zero, a contradiction. But a key part of this attack is the assumption of the absolute continuity of the integral, which only holds in the case where $f$ is integrable.  Alternatively, if it were integrable one could simply estimate $f$ by a continuous function, where the result is quite obvious.  Ultimately we are going to show that $f$ is integrable, but it is not clear to me how to show this before showing it is zero a.e. So there must be a simpler way. Does anyone have suggestions? I am running the latest version of X3 Terran Conflict (3.1) and after about 30 min - 1 hour it's memory usage goes well above 2 GB.  I only have 4 GB of ram, running Windows 7 64 bit.  As a result of X3 using more ram than is available, my hard drive starts paging and makes the game and other applications become unusable.  I have to restart the game.  Is anyone aware of this issue or how to fix it and is there any way in Windows or through some tool, to limit how much memory is given to the game?  Is this a bug in the game? Can this even be fixed?  I'm using some mods but I doubt any of them are causing this as they are simple mods like adding a tractor beam etc. Should I disconnect my MacBook Pro's power cord when the battery is fully charged? My friend told me that I need to disconnect the power cord when the battery is fully charged. Otherwise, I will shorten the life of the battery.  Other people say you should drain it once a month or point out that for long term storage, you should charge it to 50% and then periodically (3 to 6 months) bring it back to 50% and store it again.  I am going to use my laptop at home 90% of the time. So, I plan to have the power cord connected all the time.  I'd prefer to just plugging in my MacBook Pro and letting it be on charge long term and occasionally taking it away from the charger when I'm not at home or my desk.  Are these specific recommendations worth the inconvenience? I know how to use the subfig package to fit many subfigures (each with its own caption) into a larger figure (with a general caption).  I know how to use the sidecap package, the put a figure's caption on the side of the figure.  What I do not know is how to display a caption inside the figure, as if it were a subfigure.  More precisely, I have three subfigures that I would like to fit on a 2x2 layout, with the remaining quadrant used for the caption.    Is that easy to achieve? Is there some kind of icon browser? When making a custom launcher, it is nice to have a matching icon for it from the default usr ubuntu directories. The problem that is: Ubuntu seems to store icons in about 50 or more folders. Browsing all of them in nautilus takes ages.  So my question is: Is there some kind of icon browser that shows an overview of all icons in /usr/share/icons/*? I want to show that any two disjoint compact sets in a Hausdorff space $X$ can be separated by disjoint open sets. Can you please let me know if the following is correct? Not for homework, just studying for a midterm. I'm trying to improve my writing too.  My work:  Let $C$,$D$ be disjoint compact sets in a Hausdorff space $X$. Now fix $y \in D$ and for each $x \in C$ we can find (using Hausdorffness) disjoint open sets $U_{x}(y)$ and $V_{x}(y)$ such that $x \in U_{x}(y)$ and $y \in V_{x}(y)$. Now the collection $\{U_{x}: x \in C\}$ covers $C$ so by compactness we can find some natural k such that  $C \subseteq \bigcup_{i=1}^{k} U_{x_{i}}(y)$   Now for simplicity let $U = \bigcup_{i=1}^{k} U_{x_{i}}(y)$, then $C \subseteq U$ and let $W(y) = \bigcap_{i=1}^{k} V_{x_{i}}(y)$. Then $W(y)$ is a neighborhood of $y$ and disjoint from $U$.  Now consider the collection $\{W(y): y \in D\}$, this covers D so by compactness we can find some natural q such that $D \subseteq \bigcup_{j=1}^{q} W_{y_{j}}$.  Finally set $V = \bigcup_{j=1}^{q} W_{y_{j}}$, then $U$ and $V$ are disjoint open sets containing $C$ and $D$ respectively.   What do you think? I would like to know: How come that  $$\sum_{n=1}^\infty n x^n=\frac{x}{(x-1)^2}$$  Why isn't it infinity? Is there a easy way to test ubuntu on new notebooks before buying it? Is there an easy way to check a notebook's hardware compatibility with ubuntu before you buy it?  I really don't want to buy a notebook home and find several bugs caused by the hardware.  I know that DELL has some notebooks which are pre-installed ubuntu12.04LTS, i.e. the new xps. But what about other notebooks? isn't there a way to quickly check a notebook's compatibility with ubuntu?  A way I can see is using a LiveCD/ubuntu stick and boot in ubuntu first, then run some tests. But the problem is: how to make these tests in a short time automatically??? and how can I check the hardware compatibility? I know that I can use lshw or hardinfo to get informations, but only having the information is not enough, there are still some possibilities that your hardware has a bug. For instance, Lenovo T410i's wireless driver has a bug which causes extremely low speed internet connection, I googled a lot and recompiled the driver to fix that bug. So this is the kind of situation I'm trying to avoid.  Any help is appreciated. Including pdf_tex images from inkscape Javascript object members that are prototyped as arrays become shared by all class instances Im asked to prove that a polynomial of an odd degree has a root. Im going to use IVT to prove this, but I'm wondering if I can use the assumption that an odd degree polynomial has either two cases:  $$ \lim_{x\to\infty}h(x)=+\infty \\ \lim_{x\to-\infty}h(x)=-\infty \\ $$ $$and$$ $$ \lim_{x\to\infty}h(x)=-\infty \\ \lim_{x\to-\infty}h(x)=+\infty \\ $$ Then by this there exists numbers $a,b$ such that $$ h(a)&lt;0&lt;h(b) $$ $$or$$ $$ h(b)&lt;0&lt;h(a) $$ Which I think would prove that odd degreed $h(x)$ has at least a root. Or is there a more convincing way to show that there are numbers in $h(X)$ greater than zero and less than zero?  edit: (sorry about the bad limit notation) The system of equations Let $a,b,c\in \mathbb{R}$ that $a^{2}+b^{2}+c^{2}=1$. We want to find $x,y,z,w$ in the following equations:  $$\begin{align} x^{2}+y^{2}+z^{2}+w^{2}&amp;=1 \tag{1}\\ x^{2}+y^{2}-z^{2}-w^{2}&amp;=a \tag{2}\\ xw+yz&amp;=2b \tag{3}\\ yw-xz&amp;=2c.\tag{4} \end{align}$$ Background I was ignorant as an undergraduate and didn't focus heavily in any specific area. I finally graduated with a single math/computer science degree that consisted of 5 math classes beyond multivariable calculus and a few relatively basic computer science classes (algorithm analysis, SQL database design, etc.). My only research experience is in economics. Now, I work at a research institution in economics where I primarily write Stata/MATLAB code. Question I'd like to get more mathematics under my belt over the next few years in order to either enroll in a PhD program in economics/finance or a M.S. program in finance. What are my options for getting more math experience that I can use in graduate school admissions? Options These are the options I thought of so far, but I would like to know more if possible.  Study enough courses through a system like Open CourseWare to gain enough experience to enroll in more advanced undergraduate classes part time, which my employer might pay for, and then ideally move into an M.S. program in applied math.  Return to my alma mater for a M.S. degree in math that would at least give me a basis to either move into another math graduate program with higher rankings or a lower-ranked graduate program in the fields of my choice.  Join the Air Force and hopefully take advantage of the GI bill to take more courses somewhere and gain entrance into an M.S. program in applied math.  (Sadly) Forgo advanced mathematics and find a consulting job, which although unpleasant in the field of economics (in my opinion), wouldn't be difficult to obtain given my research background in the field.   Do I have any other options? I also plan to take the GRE subject test in mathematics to prove that I have at least minimal knowledge, regardless of what course I pursue (since many graduate programs will require it). I upgraded my Nexus 4 to Lollipop a few days ago but I don't like it. I'll leave out my reasons because they're not relevant here. I wiped my phone and installed a clean stock 4.2.2 version instead. I'm happy with this.  Not long after, Android automatically downloaded the 4.3 upgrade and notifies me with the choices "Later" and "Install". I don't want to do this upgrade.  How do I:   get rid of the notification, and  remove the downloaded update (to free up precious storage space).     I have already tried choosing "Later" but the same notification immediately reappears.    Based on Google search results, I also tried going to Settings &gt; Apps &gt; All &gt; Google Services Framework and unticked "show notifications" but it still appears. Force stop or disable also doesn't seem to help, so I've re-enabled the service including notifications. I didn't see any other apps in this list that sounded relevant - did I just not see it? Problem (1.8): There are ten girls and four boys in Mr. Fat's combinatorics class. In how many ways can these students sit around a circular table such that no boys are next to each other.   My Attempt: Total number of ways in which both boys are girls can be arranged on a circular table is $13!$ and the number of ways in which any two boys can be together is $2!*12!$. Therefore the answer is $13!-2*12!=11*12!$. Is this answer correct? I am asking this because I am confused about the exact meaning of the line "no boys are together." Does this mean that no two/three/four boys are together?   Note: Meanwhile I have made another attempt on the problem. We can place the $10$ girls on the circular table in $9!$ ways. Then we are left with $10$ spots which need to be filled with $4$ boys. This can be done in $P^{10}_4$ ways. Thus, the number of ways is $9!P^{10}_4$. Hibernate @Enumerated mapping Calculating frames per second in a game I put 4 different layers into my ArcMap document, but only one of them will show up on the map! I should be seeing the other 3 layers as well. When I do a Zoom to layer, I can see one layer, but I cannot figure out how to make the other 3 show up at once on top of each other.  Before I opened ArcMap, I used ArcCatalog where I right-clicked 3/4 of the shapefiles and  clicked Properties &rarr; Coordinate system &rarr; Import and then clicked on my Trees layer, which has the coordinate system I want the other 3 to have. But when I opened ArcMap the 4 layers did not overlap, nor could I move them above or below each other. Could Hermione really free the Hogwarts house-elves with her knitted hats? I have set of temp files created in my folder with .bak extensions. How can I make them hide by default in Ubuntu?  I tried adding a .hidden file with *.bak as entry in the file, but that is not working. Any help is very appreciated...