Let $\eta$ be non-negative (a.c.) continuous random variable. How to prove that $\mathbf{E}\eta = \int_{0}^{\infty}\mathbf{P}(\{\eta &gt; z\})dz$ for arbitrary non-negative random variable?  If $\eta$ is discrete random variable it's quite simple. I have an idea that we can prove it easily for random variable $$\xi = \sum_{i=1}^{n}\xi_i\mathbf{1}_{\Delta_i}$$ that can take only finite set of values , where $\mathbf{1}_{\mathbf{X}}$ is an indicator function of a set $\mathbf{X}$. Since for every measurable function $\xi$ there is an approximating sequence $\{\xi_i\}_{i\ge1}$ of the functions of such kind that tends to $\xi$ pointwise, I would like to make a passage to the limit to prove this statement for an arbitrary continuous non-negative random variable? How can one do that rigorously?
Let $X$ be a non-negative random variable and $F_{X}$ the corresponding CDF. Show,   $$E(X) = \int_0^\infty (1-F_X (t)) \, dt$$   when $X$ has : a) a discrete distribution, b) a continuous distribution.   I assumed that for the case of a continuous distribution, since $F_X (t) = \mathbb{P}(X\leq t)$, then $1-F_X (t) = 1- \mathbb{P}(X\leq t) = \mathbb{P}(X&gt;  t)$. Although how useful integrating that is, I really have no idea.
$(p\!-\!1\!-\!h)!\,h! \equiv (-1)^{h+1}\!\!\pmod{\! p}\,$ [Wilson Reflection Formula] In my bedroom the bottom half of all receptacles are controlled by one switch. Is it possible to have just one receptacle with top and bottom hot all the time?  The top half is hot all the time the bottom half is controlled by one switch.  Keep in mind there are six other receptacles in this room that are the same way controlled by the same switch. When I took the receptacle out the right side tab had been removed.  The top right screw had a black wire, the bottom right had a red wire, the top and bottom left screws had separate white wires.  I changed the receptacle out as suggested, I capped off the red wire and I capped off the white wire that was attached to the bottom left screw. I attached the other white wire to the top left screw and attached the black wire to the top right screw. I now have none of the receptacles working at all. What did I do wrong? Active Web Site as Gnome Background Is there a way to put an active website, such as Gmail, as your Desktop background in Gnome, running Ubuntu 10.10 64-bit? MS Win calls it "Active Desktop". How can the median number of sexual partners be 6.1 and 3.6? Median number of female sexual partners in lifetime, for men 25-44 years of age, 2006-2008: 6.1  Wouldn't it only be able to be x.5 or x.0? I have a process I can't kill with kill -9 &lt;pid&gt;. What's the problem in such a case, especially since I am the owner of that process. I thought nothing could evade that kill option. .NET String.Format() to add commas in thousands place for a number Why is any number (other than zero) to the power of zero equal to one? Please include in your answer an explanation of why $0^0$ should be undefined. Why aren't my guide and other dead NPCs respawning in Terraria? I am currently in hard mode and during a blood moon, several of my NPCs including my guide and my healer died. it's been several in game "days" now and they have yet to respawn. Is there a way to check why they aren't respawning?   Is there a list of reasons for the NPCs to not respawn?   Edit in reponse to lunbok's answer:  1. They don't have appropriate housing - There is an in-game housing query function (changes your cursor into a ?) that lets you click on your house to see if it is still a suitable house and I clicked in every room in my house and they are all listed as "This housing is suitable" or "This housing is already occupied".  2. Their spawn conditions aren't met anymore. - This doesn't explain why my guide isn't respawning since they don't need a condition to respawn (other than having a suitable housing which the point above already prove isn't the problem).  3. There's a goblin invasion going on. - Do the invasions last that long? It has been about two reals days and a lot more in-game "days" now. As far as I can tell there shouldn't be an invasion going on.  4. It could be because you built your house in a part of the world that is now corrupted In the sentence below, are the usages of apostrophes correct?     In research about parent stereotypes, the correlation between parents’ beliefs about their early elementary age children’s’ mathematics abilities and the children’s actual abilities increased as children aged. Is it possible to create a URL link to a website on the home screen? Here is what it looks like in Blender Render (Not Cycles).   This is how I set it up.   Basically, I'm trying to export it, but it's not including the &quot;Freestyle&quot; lines. When I open up the .dae file in Finder, it looks like this:   What is wrong here? I want it to be exported (COLLIDA .dae) with the black outline. I'm seeming to think that maybe the &quot;Freestyle&quot; is only for the Blender Render. Am I right? How would I go about getting the black outline included in my exported model? Is it an export setting I have to tick? Thanks for any helpful answers. Understanding of the theorem that all norms are equivalent in finite dimensional vector spaces rails - outputting user input with Paragraph Returns? How to create individual chapter PDFs from included TeXs? My document structure has   one file with preamble (i.e. MainTex) and around 75 individual .tex files (i.e. Chapter_01, Chapter_02, ..., Chapter_75) representing each chapter.   I am using \include command to create a one big PDF file, the output is MainTex.pdf. Life is all good up to this point.   If I have to create individual PDF for each chapter then do I need to run 75 times with each chapter name and rename the PDF manually to match to chapter name. Because if I include only Chapter_01 and run it creates PDF named as MainTex.pdf.  Is there a way I can automate this workflow? Test if a package (or package option) is loaded [french]{babel} (aka frenchb) is incompatible with some other packages, such as tikz, since it tries to insert \thinspace before semi-colons.  In order to make these two play nice, you have to call \shorthandoff{;} in the document.  Now I have a package that uses tikz and I would like to locally disable the semi-colon for babel, instead of disabling it for the whole document. I could hack the .sty of the package to do that, knowing that I'm using frenchb, but I would rather make something clean and portable.  Is there a way in my package that I can test if frenchb is loaded and disable semi-colon management with babel locally, so the package doesn't have to be hacked?  Edit:  Martin's solution gives me something like this in general:  \RequirePackage{ifthen} \newcommand{\@babel@loaded}{0} \AtBeginDocument{\@ifpackageloaded{babel}                                                    {\renewcommand{\@babel@loaded}{1}}                                                         {\renewcommand{\@babel@loaded}{0}}                                                       } \newcommand{\somecommandusingsemicolon}{   \ifthenelse{\@babel@loaded=1}{\shorthandoff{;}}{}     % code with semi-colon here }   and in the specific case of tikz:  \AtBeginDocument{\@ifpackageloaded{babel}   {%     \g@addto@macro\tikz@installcommands{%       \shorthandoff{;}%     }     \g@addto@macro\tikz@uninstallcommands{%       \shorthandon{;}%     }   }   {\relax} } What is the logical form of the definition of validity? My text book gives the definition of validity as "An argument is valid IFF if the premises are true, then the conclusion must be true". Using a conditional elimination on the RHS of the IFF yields "An argument is valid IFF the premises are false or the conclusion is true".   Yet, this seems strange to me. Am I doing something incorrect with my manipulation or is this definition actually true? Surely the criteria for a valid argument goes beyond a false set of premises or a true conclusion. What is the significance of the name Bleach? The name "Bleach" seems to be having no relevance to the plot unlike most other series. Was it just chosen at Kubo-sensei's whim or does it have some significance? Maybe some cultural significance associated with shinigami, etc. that I am now aware of? I have been using Ubuntu 12.04 for quite a while and have never had a problem come at me out of the blue like this. I'm trying to install python 3.2 on my Ubuntu system and every time I run the code to compile the python source, I get this error:  'Command 'sudo' is available in '/usr/bin/sudo' The command could not be located because '/usr/bin' is not included in the PATH environment variable. sudo: command not found'   I've also tried running gksudo command to view what my environment shows but I pretty much get the same error. I have removed the mentioned libraries. Then my system disconnected from NIS service and many packages are being removed. The problem is I am not even able to login in my system. When i restarted it is showing "low graphics mode error". I do not know what to do Please help me. I am a beginner to Ubuntu. Making a WinForms TextBox behave like your browser's address bar When a C# WinForms textbox receives focus, I want it to behave like your browser's address bar.  To see what I mean, click in your web browser's address bar. You'll notice the following behavior:    Clicking in the textbox should select all the text if the textbox wasn't previously focused. Mouse down and drag in the textbox should select only the text I've highlighted with the mouse. If the textbox is already focused, clicking does not select all text. Focusing the textbox programmatically or via keyboard tabbing should select all text.   I want to do exactly this in WinForms.  FASTEST GUN ALERT: please read the following before answering! Thanks guys. :-)     Calling .SelectAll() during   the .Enter or .GotFocus events won't   work because if the user clicked the   textbox, the caret will be placed   where he clicked, thus deselecting all   text.      Calling .SelectAll() during the .Click event won't work because the user won't be able to select any text with the mouse; the .SelectAll() call will keep overwriting the user's text selection.      Calling BeginInvoke((Action)textbox.SelectAll) on focus/enter event enter doesn't work because it breaks rule #2 above, it will keep overriding the user's selection on focus.