I am working in python. I have a function for incomplete beta. Iow would I calculate tCDF and invT using this? the incomplete beta function that I have is this:  def incBeta(a, b, x):      # Shortcut special cases     if (x == 0):         return 0;     elif (x == 1):         return 1;      # otherwise calculate things.     else:         lbeta = math.lgamma(a+b) - math.lgamma(a) - math.lgamma(b) + a * math.log(x) + b * math.log(1-x)         if (x &lt; (a+1) / (a+b+2)):             return math.exp(lbeta) * contfractbeta(a, b, x) / a;         else:             return 1 - math.exp(lbeta) * contfractbeta(b, a, 1-x) / b;   How do I calculate the tcdf and invT using the value returned from this?
Is there a way to closely approximate the CDF of a student-t distribution at a point $x$ without involving the hypergeometric function? For example, by using a series expansion, or expressing the CDF in terms of simpler functions?  The t-distribution can   $$t = \frac{X\sqrt{n}}{Y}$$  where $X$ is normally distributed with mean 0 and variance $\sigma^2$; $\frac{Y^2}{\sigma^2}$ has a chi-squared distribution. Maybe this expression can help simplify the t CDF?  I am trying to write an algorithm to compute the student-t CDF for any real number, so using the hypergeometric function will be extremely difficult. I am also trying to avoid integrating the PDF to get the CDF.
Sudo comes up with an error, cannot run anything as root For some reason, when I try to run any programs (I am trying to run a rootkit hunter: rkhunter) as root on the command line with sudo like this:  sudo rkhunter   Then I get this message:  You must be the root user to run this program   and then I get these lines:  sudo: error in /etc/sudo.conf, line 0 while loading plugin 'sudoers_policy' sudo: /usr/lib/sudo/sudoers.so must only be writable by owner sudo: fatal error, unable to load plugins   I try typing in just sudo but that comes up with the same three errors as above. Also in /etc/ sudo.conf does not exist.  I cannot run any other programs as root through sudo. It was also strange because I could run as root a day ago. I would like it to work.  Just so you know, I am the only user of this computer, and the administrator, running Lubuntu 14.04.1. $|p(z)| \leq M$ for $|z| \leq 1$ Show that $|p(z)| \leq M|z|^n$ for $|z| \geq 1$ I'm having some trouble understanding a proof on  on Number Theory and I was wondering if you guys could give me some help. The problem is that I don't understand the last implication on the proof for example 1.1     Example 1.1. Let x and y be integers. Prove that 2x + 3y is divisible by 17 iff 9x + 5y is divisible by 17.      Solution. 17 | (2x + 3y) ⇒ 17 | [13(2x + 3y)], or 17 | (26x + 39y) ⇒ 17 | (9x + 5y)       conversely, 17 | (9x + 5y) ⇒ 17 | [4(9x + 5y)], or 17 | (36x + 20y) ⇒ 17 | (2x + 3y).   My problem is that I don't understand how does 17 | (26x + 39y) imply 17 | (9x + 5y). If you could elaborate on this step I would be most grateful.  I'm sorry if this is an obvious question but I am a beginner and I just can't get it.  Thanks for your help in advance. Upper bound on the number of charts needed to cover a topological manifold If $M^n$ is a compact topological manifold (not necessarily with additional structure), is there an upper bound on the number of charts needed to cover $M$ ? Does this bound depend on the dimension of $M$ ?  Thanks in advance...  Cheers How to debug suspend? Parsing input with scanf in C What steps does a manuscript typically go through from submission to publication (or rejection) in a typical journal? How are these steps referred to, in particular by editorial systems, and how long do they each typically take?  Note that this question is about the typical situation and hence not about:   Journals with an atypical workflow, e.g. those that allow for an instantaneous reviewer–author interaction. Exceptional steps or rare occurrences such as withdrawal or .   This is a canonical question on this topic as per . Due to its nature, it is rather broad and not exemplary for a regular question on this site. Please feel free to improve this question. How can I get a debug log for the sites guest user/public profile? [updated for Spring 18] My problem is simple. I think that the strange deformations on the top are there because there are so many vertices in one face. How do I fix this while maintaining nice topology?  Although I triangulated the top polygon, the problem still persists. What is the purpose of .bashrc and how does it work? How to make the BibTeX reference list visible in a LaTeX document Im very new at LaTeX and I would appreciate some help solving this problem. I have created a BibTeX file containing all references to a document. In this text file BibTeX items are inserted and no other text are written, for instance @article{...}. When I call for this bib file from the main.tex file I use the commands:  \bibliographystyle{plain} \bibliography{thebibliography}   Now to my question. All i get when I compile this main.tex is the title (bibliography) for this chapter, otherwise the textfield is blank. Is this error occurring because I should write anything in the bib file or have I missed any lines in the main.tex file. MacBook Pro stuck in gray screen when booting I've got a Late-2011 15" MacBook Pro stuck in the gray screen when booting AFTER login. I've tried removing the drive (it's non-retina) and booting from a working bootable Yosemite installer, no luck. (it sees the startup USB drive, the progress bar progresses, but stuck at the gray screen again even without a drive.  Tried NVRAM reset (cmd option P R), it has reset (the login sound's volume changed) but nothing changed.  Tried holding D on startup, AHT doesn't start, instead, it tries to boot into the OS.  Tried Cmd V, it sometimes works and displays the verbose output, sometimes, it acts like I haven't even pressed. Again, stuck after login.  Tried booting again from USB, I select USB (after seeing both drives correctly), but no luck, it's also stuck.  I've stumbled upon this:    I've tried booting into single user mode with Cmd S, it worked ONCE, I've disabled the graphics extensions just as shown at that post, restarted, but again, nothing changed.  More weirdly, now the Cmd S doesn't work either. It just takes me to login screen without showing the terminal, just as I haven't pressed anything.  Why would this happen? Why would a Mac refuse to enter hardware test mode, single user mode, or refuse to boot from a working bootable Yosemite drive both with or without the main drive installed?  UPDATE: I've run the AHT and got an error:  4MEM/66/40000000: 0x84e0ec98  It looks like a memory issue, but I'm not sure.   UPDATE 2: I've tried reinserting the RAMs and the the problem is not reported anymore. However, the Mac still won't boot. Deleting files older than 30 days based on filename as date If I have a folder of files with their filenames as the date they were created:  2019_04_30.txt 2019_04_15.txt 2019_04_10.txt 2019_02_20.txt 2019_01_05.txt   How would I compare the files names against todays current date  $ date "+%Y_%m_%d" &gt;&gt;&gt; 2019_04_30   If the file names date is greater than 30 days then delete it. I would expect to end up with  2019_04_30.txt 2019_04_15.txt 2019_04_10.txt   I don't have to follow this naming convention, I could use a more suitable date format. Use of substitution into the integral $\int_0^2 \frac{\arctan x}{x^2+2x+2}dx$ Let $X$ de a vector space and $A\subset X$. If we define $A+B :=\{a+b|a\in A, b\in B\}$ I am trying to show that    $$ \begin{equation} 2A \subsetneq A+A, \end{equation} $$  i.e., it might happen that $2A \neq A+A$. I was able to show that $2A \subset A+A$, but I am not able to come up with a counterexample to show that the converse is not necessarily true. If I assume $A+A\subset 2A$ and let $x\in(A+A)$, then by its definition we have $x=a_1 + a_2$ for some $a_1,a_2\in A$ I guess I could naively say that $a_1+a_2 = 2(a'_1+a'_2)$ where $a_i=a_i/2$ for $i=1,2$ and I guess $(a'_1+a'_2)$ might not be an element of $A$ in some concrete case but I am not able to come up with anything and I've spent more time than I would like to admit. Any suggestions?  Thank you. resolution is undefined in XeTeX so the following code will produce different values when compiled with pdfTeX and XeTeX.  \documentclass{article} \usepackage{graphicx}  \newsavebox\IBox \savebox\IBox{\includegraphics[scale=1]{koala.jpg}}  \begin{document} \the\wd\IBox \end{document}   How to force pdfTeX and XeTeX to produce the same measurement for the imported image? I am trying to solve:  $$\int_{-\infty}^{\infty}\frac{x\sin{x}}{x^2 + a^2}dx$$  and show that it equals $\pi e^{-a}$ for all $a &gt; 0$.  I translate it to its complex equivalent:  $$lim_{R \rightarrow \infty} \int_{-R}^{R}\frac{z\sin{z}}{z^2 + a^2}dz = \int_{C}\frac{z\sin{z}}{z^2 + a^2}dz - \int_{\gamma}\frac{z\sin{z}}{z^2 + a^2}dz$$  where C is a half circle with radius R, above the real axis, and $\gamma$ is only the curved (top part) of the half circle.  I've shown that $$\int_{\gamma}\frac{z\sin{z}}{z^2 + a^2}dz$$ tends to 0 as $R \rightarrow \infty$.  So now:  $$lim_{R \rightarrow \infty} \int_{-R}^{R}\frac{z\sin{z}}{z^2 + a^2}dz = \int_{C}\frac{z\sin{z}}{z^2 + a^2}dz$$  By residue theorem,   $$\int_{C}\frac{z\sin{z}}{z^2 + a^2}dz = 2\pi i \cdot res_{ai}f$$  as $ai$ is the pole of $f$ that lies above the real axis.  $$2\pi i \cdot res_{ai}f = 2\pi i \cdot lim_{z \rightarrow ai} (z-ai)\frac{z sin{z}}{z^2 + a^2}$$  By L'Hospital's rule, this is equivalent to:  $$2\pi i \cdot lim_{z \rightarrow ai} (z-ai)\frac{z^2\cos{z} + 2z\sin{z} - zai\cos{z} - ai\sin{z}}{2z} = 2\pi i \cdot \frac{\sin{ai}}{2} = \pi i \sin{ai}$$  But how is $\pi i \sin{ai}$ equivalent to $\pi e^{-a}$? Did I make a mistake? Do sensors wear out? We all know that shutters wear out and they have a limited number of actuation's.  The question I have is, do sensors wear out too? Do they suffer any kind of damage after each shot?  Should I be concerned about this or is the sensor lifespan way longer than the shutter lifespan? Hahn-Banach Theorem for separable spaces without Zorn's Lemma Can't plot with gnuplot on my Mac