Suppose I'm given the mean and one quantile (e.g. the 95% quantile) of a random variable $x$, and I want to find the parameters $\alpha$ and $\beta$ of a Beta distribution that has the same mean and quantile. Is there an efficient way to do it in R?
Suppose I'm given the mean and one quantile (e.g. the 20% quantile) of a random variable $x$, and I want to find the parameters $\alpha$ and $\beta$ of a Beta distribution that has the same mean and quantile.  Is there an efficient way to do it?    Using just the mean, I know that since $\bar{x} = \frac{\alpha}{\alpha+\beta}$, we have $\beta = \frac{\alpha}{\bar{x}} - \alpha$.  So we only really have one parameter to estimate.  But I'm unsure how to use the quantile information to take the next step.  Maybe there's something I can do with the Incomplete Beta when I know the ratio $\frac{\beta}{\alpha} = \frac{1-\bar{x}}{\bar{x}}$?  I have access to R myself, so I could use a numerical optimizer for this, but ideally I need a method that can be carried out in Excel in someone else's environment.  Excel does have BETA.DIST() and BETA.INV() functions available.  A look-up table would be fine, but a closed-form formula would be better if it's possible.
Viewshed analysis plugin on QGIS keeps resulting in errors I've been trying to test the Viewshed analysis plugin on QGIS 2.10, but it keeps giving back error messages. I've tried to reduce the radius area and have also reprojected both my DEM and my point shapefile to UTM, in order to avoid a possible memory error mentioned in another question regarding this plugin (that the using of geographic coordinates might cause a memory error).  Still, I keep getting Python error messages when I try to run it. Does anyone know whats going on? Is this plugin "broken"? Capitalizing "the" when mid-sentence in a company name? Consider a company called:     The Association of Examples Ltd.   When you refer to this company, should you have to capitalize "the" when it's mid-sentence and would have been used even if it wasn't in the name?   It looks odd to me:     In other news, The Association of Examples announced that...      Sarah is the founder of The Association of Examples and has...   But I imagine it's the correct way.  For the grammar-conscious, why or why not?    To give you context, I am asking also when branding ones own company like that. The Economist did it (as did ) and , but I can imagine it can cause confusion. Prove that every Lebesgue measurable function is equal almost everywhere to a Borel measurable function Suppose $(\mathbb{R},\Sigma(m),m)$ is our measure space, where $m$ is Lebesgue measure.  Also, suppose $f : \mathbb{R} \to [-\infty, \infty]$ is a Lebesgue measurable function.  The problem:     Prove that $f$ is equal almost everywhere to a Borel measurable function.   My attempt:  We only have to prove this assertion for a non-negative Lebesgue measurable function $f$ because the result will follow for all Lebesgue measurable functions.  Furthermore, since any Lebesgue measurable function can be approximated by a sequence of non-negative, monotonically increasing, Lebesgue measurable simple functions $s_{n}$, we only need to prove the claim for an arbitrary Lebesgue measurable simple function.  So, let $s: \mathbb{R} \to [-\infty, \infty] $ be a Lebesgue measurable simple function.  We can write $s$ canonically as $$ s(x) = \sum \limits_{i = 1}^{n} \alpha_{i} \chi_{A_{i}}(x)$$ where $\alpha_{i} \in [-\infty, \infty]$, $\bigcup \limits_{i = 1}^{n} A_{i} = \mathbb{R}$, and $A_{i} \cap A_{j} = \emptyset$ if $i \neq j$.  For each $i$, since $A_{i}$ is Lebesgue measurable, we can find a Borel set $B_{i}$ such that $A_{i} \subseteq B_{i}$ and $m(B_{i} \setminus A_{i}) = 0$.  Clearly, this implies that $\bigcup \limits_{i = 1}^{n} B_{i} = \mathbb{R}$.  Now we just need the $B_{i}$'s to be pairwise disjoint, with each $B_{i}$ still retaining $A_{i}$.  To make them pairwise disjoint, I constructed the following sets:  $\tilde{B_{i}} = [B_{i} \setminus (\bigcup \limits_{j \neq i} B_{j})] \cup A_{i}$.  This construction gives us that the $\tilde{B_{i}}$'s are pairwise disjoint (I think....) and $A_{i} \subseteq \tilde{B_{i}}$.  But I don't know that $\tilde{B_{i}}$ is necessarily still a Borel set. :( :(  Am I approaching this problem all wrong? Difference between projection and datum? Streaming large files in a java servlet Say I have a cologne bottle of 100 ml that I want to carry in my hand luggage on a plane trip.  100 ml is the limit so it should be fine for the transport regulations (if not, please let me know!).  The problem I always encounter is regarding the storage of the bottle: how to prevent it from leaking?  What I normally do is to put it in a plastic bag, so that the possible loss remains there. It is fine, only that the bottle ends up quite wet.  What would be a better approach? I am trying to draw the below given figure. Please help me to plot it in Tikz. I am only able to plot concentric circles. . I would like to have different colors in between different circles. Also, the text should be along the curve. The arrow in between the two concentric circles does not have to overlap with the circle on the right hand side.  I would be grateful if you could help me in plotting this in Tikz. Please let me know if you need more information. Thanks!  \documentclass[conference]{IEEEtran}  \ifCLASSINFOpdf  \else  \fi  \usepackage[usenames,dvipsnames]{color} \usepackage[T1]{fontenc} \usepackage{tikz} \usetikzlibrary{positioning} \usetikzlibrary{arrows} \usetikzlibrary{shapes.multipart} \usepackage[caption=false]{subfig} \usepackage{tabularx,tikz} \usepackage{graphicx} \usepackage{color} \usepackage{pdfpages} \begin{document}  \title{Practice Tex}   \maketitle  \section{Introduction}  \begin{figure} \begin{center} \begin{tikzpicture}     \draw(0,0) circle (0.4cm)   node[draw=none,sloped,above]{cxvzxcv};         \draw(0,0) circle (0.75cm) node[draw=none,sloped,above]{ratio};    \draw(0,0) circle (1.25cm);   \node[draw=none,align=center, font=\scriptsize,text width = 1.25cm] at (0,2.2) {22};    \draw(0,0) circle (2cm);   \node[draw=none,align=center, font=\scriptsize,text width = 1.25cm] at (0,3.8) {33333};    \draw(0,-9) circle (0.4cm);   \node[draw=none,align=center, font=\scriptsize,text width = 1.25cm] at (0,-9) {fsgsdgf};      \draw(0,-9) circle (0.75cm);   \node[draw=none,align=center, font=\scriptsize,text width = 1.25cm] at (0,-7.8) {fgdsfg};    \draw(0,-9) circle (1.25cm) node[midway,sloped] at (0,-9) {dfsdfad};    \draw(0,-9) circle (2.8cm);   \node[draw=none,align=center, font=\scriptsize,text width = 1.25cm] at (0,-6.4) {dfsdfsd};    \draw(0,-9) circle (3.2cm);   \node[draw=none,align=center, font=\scriptsize,text width = 1.25cm] at (0,-6) {dfsdfsd};    \draw(0,-9) circle (3.6cm);   \node[draw=none,align=center, font=\scriptsize,text width = 1.25cm] at (0,-5.6) {sfdsfd};    \draw(0,-9) circle (4.4cm);   \node[draw=none,align=center, font=\scriptsize,text width = 1.25cm] at (0,-4.8) {sdfsf};     \pgfsetlinewidth{3pt}    \draw [-implies][-&gt;] (0,-4) -- (0,-4.6);   \end{tikzpicture}  \end{center} \end{figure} \end{document} Is it possible to have the Corruption and the Crimson Biomes in the same world? I was reading on the wiki how there is a chance that the Corruption will be replaced with the Crimson.  I am wondering if when you get a world where you have the Crimson is it possible to also have the Corruption if you bring over corruption seeds from another world and use them. Or would these seeds just get you more of the Crimson? What's the deal with a leading underscore in PHP class methods? While looking over various PHP libraries I've noticed that a lot of people choose to prefix some class methods with a single underscore, such as  public function _foo()   ...instead of...  public function foo()   I realize that ultimately this comes down to personal preference, but I was wondering if anyone had some insight into where this habit comes from.  My thought is that it's probably being carried over from PHP 4, before class methods could be marked as protected or private, as a way of implying "do not call this method from outside the class".  However, it also occurred to me that maybe it originates somewhere (a language) I'm not familiar with or that there may be good reasoning behind it that I would benefit from knowing.  Any thoughts, insights and/or opinions would be appreciated. I'm looking for a way to get the Default currency symbol (in a none-multi-currency org) of the salesforce org locale (to have it displayed on a visualforce page in a field that can't be &lt;apex:inputField&gt; or &lt;apex:outputField&gt;) preferably query-able from apex (via the database, a describe or whatever) and then again the actual symbol, meaning € for Euro, $ for dollar, and so on...  There must surely be some sort of mapping hidden in the code somewhere salesforce does this via the input/outputfields if bound to an sobject of type currency  Can anyone point me in the right direction? Why cannot fermions have non-zero vacuum expectation value? throwing a $k$-sided dice until you get every face the same number of times How to deal with "java.lang.OutOfMemoryError: Java heap space" error? I am writing a client-side Swing application (graphical font designer) on Java 5. Recently, I am running into java.lang.OutOfMemoryError: Java heap space error because I am not being conservative on memory usage. The user can open unlimited number of files, and the program keeps the opened objects in the memory. After a quick research I found  and others saying on Windows machine the JVM defaults max heap size as 64MB.  Given this situation, how should I deal with this constraint?  I could increase the max heap size using command line option to java, but that would require figuring out available RAM and writing some launching program or script. Besides, increasing to some finite max does not ultimately get rid of the issue.  I could rewrite some of my code to persist objects to file system frequently (using database is the same thing) to free up the memory. It could work, but it's probably a lot work too.  If you could point me to details of above ideas or some alternatives like automatic virtual memory, extending heap size dynamically, that will be great. I'm an Egyptian citizen, who holds Schengen visa and stay permit in Italy. Can I go to UK for some days with my stay permit and Schengen visa? Android backup/restore: how to backup an internal database? Meaning of the chemical potential for a boson gas My lecturer told me that $\mu$, the , is zero or negative, and in the following example, mathematically it acts as a normalization constant. But is there any physical insight about why boson gas can be zero or negative? I think it is due to the fact the photon gas can pop up from nowhere (i.e. vacuum fluctuation). $$ f_{BE}(\varepsilon)=\dfrac{1}{e^{(\varepsilon-\mu)/(k_B T)}-1}$$ How to return to original .pdf presentation after open a .pdf linked file? I'm preparing a beamer presentation and I'm using hyperlinks for the first time; When I do something like:  \href{name_file_to_open.pdf}{here I put a link to a figure which is working well}   It works just fine and open the .pdf document; Problem is I can't return to my presentation, cause when I close the linked.pdf I close it all. (I try this with movie and indicating an area to the file open like \href[width=3cm,height=2cm] but then it doesn't work)  Can anyone please has any suggestion to this problem? Undergraduate/High-School-Olympiad Level Introductory Number Theory Books For Self-Learning This is a comic book I read no later than 1993 (so is pre-1993).  And probably after 1988 though I can't be certain.  The protagonist is a huge barbarian with an axe, who seems like an old man, who is defending a series of gigantic walls against an invading army, apparently single-handedly. They keep having to fall back to inner walls. He has to get a massage at one point (not that kind of comic btw).  It's not a super-hero or funny comic, it's more of a serious graphic novel.  That's about it, sorry it's so vague. How to automatically fetch missing dependencies when installing software from .deb?