I have a question regarding the Z-Score test when it comes to compare two proportions.  Usually, one would use this formula to obtain the Z-Score:   and then compare it to a Standard Normal Distribution to find if the difference is statistically significant.  Yet, I was wondering how can we evaluate such a statistic when we have the following problem for example:  Let's say we have tow factories which produce the same set of products, some of them can break during the process. We have one proportion, which is the proportion of broken objects in each factory. We can compare this proportion between the two factories with the preceding formula.  But what if I'm interested by another proportion, that is the amount lost due to broken objects wich can be defined by :    where x(i) equals 1 if the object i is broken and 0 otherwise and P(i) is the price of the object i.  How can we derive confidence intervals and Z-score test for such a proportion ?   Thanks for your help  EDIT: I found a solution  Yet, in the demonstration written by wuber the variables X(i) are supposed to be independent. That is why he can write   What if it is not the case ? For example let's say that an object manipulated by a worker/machine is more likely to break if the worker/machine already broke an object or more in the past. How can we determine the covariance between these variables ?
I know the "textbook" estimate of the standard error of a proportion is $SE=\sqrt{\frac{p(1-p)}{n}}$, but does this hold up when the data are weighted?
Is the Discrete Topology on $X$ the Only One Containing All Infinite Subsets of $X$? Prove or find counterexamples.  Let $X$ be an infinite set and $T$ be a topology on $X$. If $T$ contains every infinite subset of $X$, then $T$ is the discrete topology. What (if any) countries are either open to or have set definitive plans to allow international tourism? Storing the original document class page layout with geometry Is it possible, using the geometry package, to store (and restore) the original layout specified by the document class (in my case, the class is report)?    Here is some context.  I have been editing a long document in the default page layout for the report document class.  Now I found out that I need a title page.  There is a particular title page layout, and in fact, it works perfectly if I just load the geometry package with its default and change just two settings.  But then I want the rest of the document back in the original page layout!  I can't do something like \restoregeometry, since I think geometry just overrides the class options... i.e. there doesn't seem to be anything to restore.  Similarly, it seems I can't use \savegeometry or \loadgeometry.  So how can I get back to my original layout for the rest of the document without painstakingly hard-coding in all of the specific page layout variables?    Here is a minimum working example:   \documentclass[a4paper,10pt]{report}  \RequirePackage[a4paper,dvips]{geometry} % g1 \geometry{top=2.5cm,bottom=2.3cm}        % g2  \begin{document}  \input{the_title_page}  \SomeGeometryCommandsHere  % g3  \input{the_rest}  \end{document}   If I run the above code with the lines labeled "g" commented out, then the title page does not have the correct page layout, but the rest of the document is formatted perfectly.    If I leave lines g1 and g2 uncommented, then the title page has exactly the correct layout, but no matter what I put for g3 (e.g. \loadgeometry, \restoregeometry, etc.) I can't recover the original layout that I had when g1 and g2 were commented.  Of course, I could completely specify the original layout exhaustively in line g3, and this should in principle work.  However, I spent almost one hour on this last night and when I still couldn't get it formated correctly I decided I really needed a smarter solution. There is the next characterization for valuation domains:  Let $D$ be an integral domain and $K$ its field of fractions. The following are equivalent:   For every nonzero $x$ in $K$, either $x$ in $D$ or $x^{−1}$ in $D$. The ideals of $D$ are totally ordered by inclusion. The principal ideals of $D$ are totally ordered by inclusion (i.e., the elements in D are totally ordered by divisibility.) There is a totally ordered abelian group $Γ$ (called the value group) and a surjective group homomorphism (called the valuation) $v :$ $K^×$ $→ Γ$ with $D = \{ x ∈$ $K^×$ | $v(x)$ ≥ $0 \}$ $∪$ {0}.   The equivalence between 1, 2 and 3 are clear, and I understand that the fourth can be found in Krull's article (1936), but I don't speak german and I can't find a proof anywhere. Any link or hint will be much appreciated. Why isn't a virus "alive"? GUI/Unity crashing in 16.04 LTS after updates 2018-01-04, compiz segfaults The latest updates (4/1/2018) make my laptop constantly crash the GUI/Unity:  (Intel Pentium su4100 processor)  syslog:  Jan  5 11:38:53 1810 kernel: [ 1850.327738] compiz[11911]: segfault at 0 ip 00007f6c7baf0c16 sp 00007ffd5ec71c60 error 4 in i965_dri.so[7f6c7b513000+82d000]   After login I end up with an empty desktop, just a wallpaper, GUI/Unity are in a crash loop:   No panel.  No dash.  Can't start a program. Launcher disappears. Sidebar disappears. System crash. Windows key not working. The key combination Alt+Tab not working.   Simply, the computer is not usable. Same for guest login. The only thing working: open up a terminal CTRL+ALT+T to examine log files.  I somehow forced  to let me log in and file the bug, but still lots of problems:   Dash not working Alt+Tab not working Sometimes windows all disappear for a few seconds     Any ideas for a solution or workaround?   UPDATE     If you have the same/ very similar problems, follow the link to my    report and mark there that you're affected too. Or file your own. Please leave a comment   if you wish, or upvote - this is a nasty problem - but an answer should   offer a fix or a workaround so users can use their computer again.    Without , Ubuntu can't fix issues. infinite monoid H that is not a free monoid and contains a free monoid as a submonoid Let $H= \langle h_1, \ldots , h_n \rangle$ ($n&gt;1$) be an infinite monoid that is not a free monoid. Does $H$ contain an isomorphic copy of a free monoid as a submonoid? EDIT. It is a natural question. The corresponding question for groups is the Burnside problem. Optimizing logical sector size for physical sector size 4096 HDD I read it as a paperback around 2009ish. There are at least two books in the series. In the first book, we learn that the protagonist lives up in the mountains. Her people are distrusted by the people in the plains, and I think have either dark or olive skin. She leaves home to learn magic, something I think is rare in the world she lives in. When she arrives, there's a crazy power-hungry man at her destination and she has to hide who she is because otherwise he'd have her killed to prevent her from surpassing him. At some point, she winds up in a set of chambers set into the mountain where she finds a pool of water and carvings about dragons. Somehow, this leads into her learning to become a dragon, I think perhaps after meeting one. I want to say that the sequel got into her having dreams that turn out to be partly prophetic and partly communication.  One of the reasons the book sticks out in my memory is that, despite the mentions of the protagonists dusky skin, the cover depicts a fair-skinned blonde girl, I think holding a glowing globe of light. When Ron broke his wand, why didn't he apply for Hogwarts financial aid? We know, from Book Six, that Hogwarts has a financial aid for students in need. It's supposed to cover all expenses regarding materials and school supplies, so it certainly covers wands. So why didn't Ron simply apply for this fund when he broke his wand in Book Two, since his family could not afford a new one?  Seems absurd that no teacher would notice that Ron had a broken wand and inform him there's a school fund. Plot hole?  Obs.: Even if Ron could afford a new wand, one could ask how we would purchase it (you must experiment personally to find a wand that chooses you). It turns out that there's a local branch of Ollivander in Hogsmeade. I'm sure that, under those circumstances, a second-year student like Ron would be allowed to visit Hogsmeade to purchase a new wand. What evidence is there supporting an alternative parentage for Jon Snow? I've heard speculation that Jon Snow's actual parents may be Rhaegar and Lyanna Stark, but in reading the books I'm not sure what evidence could be used to support this conclusion.  I thought there might have been something in the conversation Davos had before being smuggled into White Harbor, but I couldn't stretch anything that far.  What evidence do proponents of this theory cite?  Does any of it involve stuff in the texts or just sweeping generalizations of the characters' personalities (e.g. "Ned Stark is too honorable to father a bastard"). I am little confused with the applicability of reinterpret_cast vs static_cast. From what I have read the general rules are to use static cast when the types can be interpreted at compile time hence the word static. This is the cast the C++ compiler uses internally for implicit casts also.  reinterpret_casts are applicable in two scenarios:   convert integer types to pointer types and vice versa  convert one pointer type to another. The general idea I get is this is unportable and should be avoided.     Where I am a little confused is one usage which I need, I am calling C++ from C and the C code needs to hold on to the C++ object so basically it holds a void*. What cast should be used to convert between the void * and the Class type?  I have seen usage of both static_cast and reinterpret_cast? Though from what I have been reading it appears static is better as the cast can happen at compile time? Though it says to use reinterpret_cast to convert from one pointer type to another? Is there proof that the DSA construction, also used by ECDSA, is secure assuming that discrete logarithms in the relevant group representation are difficult? Check which IPs or web-sites an app is communicating with? Usually they do it behind the scenes. So I'd love to know where apps are actually sending data and from whom they are actually getting responses. Why does Axii sign not work? I decided to make sure that I know this important difference between American and British English, so I wrote what I have found out so far and I would be grateful to anyone who reads this and tells me whether I am wrong, or not.  In British English when people say  to hospital or in hospital when  talking  about somebody being there as a patient they don't use the definite article : "I had to go to hospital", "She spent two weeks in hospital". And the meaning is that somebody was there as a patient.   If then for some other reasons British English speakers  will use the definite article which will change the meaning itself, I noticed that, in American English, native speakers often use the  the and if they need to show that somebody is in church to pray,  in school as a student, in hospital as a patient, in prison as a prisoner, they use 'in' and not 'at'. Do American English speakers use 'at' like British English speakers use 'the' to give the sentences a different meaning?    Are my sentences correct? Do they show American English usage?   He is in the school. (enrolled as a student) He is at the school. (for some different reasons) He is in the hospital. (as a patient) He is at the hospital. (visiting somebody) He is in the church. (to pray) He is at the church. (for some different reasons) He is in the university. (as a student) He is at the university. (not as a student) He is in the college. (as a student) He is at the college. (Not as a student) He is in the prison. (as a prisoner) He is at the prison. (not as a prisoner) Setting background-image using jQuery CSS property There does not exist group $G$ such that Aut$(G)\cong \mathbb{Z}_n$ (for odd $n$) Keep the same field headers after joining a table to a shapefile in QGIS I noticed that after joining a table to a shapefile the headers of each fields in the table used for the join are changed by QGIS and they are attributed to a different name.  For instance, I had a shapefile with vegetation_codes and a table with vegetation_codes and veg_definition (these were the headers). After joining the table to the shapefile and also saving the shapefile and creating a new one, the vegetation_classes header was changed into vegetati_1.  Is there a way to keep the original headers?  I am using QGIS Dufour on Windows 7 and the table that I join to the shapefile is CSV (tried with dbf as well and the problem is the same). Why modules with no variables?