Given an X sided die, and Y throws, what is the probability that the sum of the throws is at least Z
Probability to obtain more than X with 3 dice.
How to create a matrix with 20 columns in latex The code below works,  but when I add 10 more columns, it does not. So, how can I add ten more columns to the matrix below?  \documentclass{article} \usepackage{amsmath} \begin{document}  \begin{equation} \begin{bmatrix}  1 &amp; 0 &amp; 0 &amp; 0  &amp; 0 &amp; 1 &amp; 0 &amp; 0 &amp; 1 &amp; 0  \end{bmatrix} \end{equation}  \end{document} How do I disable negative scaling? By default blender allows you to scale past 0 - how do I prevent this?  i.e. it's common in other 3D modelling software to resize a set of vertices against an axis to align them - however this isn't possible when negative scaling is enabled. Possible bug in sidebar "question asked:" date Is it always better to use the whole dataset to train the final model? A common technique after training, validating and testing the Machine Learning model of preference is to use the complete dataset, including the testing subset, to train a final model to deploy it on, e.g. a product.      My question is: Is it always for the best to do so? What if the   performance actually deteriorates?   For example, let us assume a case where the model scores around 65% in classifying the testing subset. This could mean that either the model is trained insufficiently OR that the testing subset consists of outliers. In the latter case, training the final model with them would decrease its performance and you find out only after deploying it.   Re-phrasing my initial question:     If you had a one-time demonstration of a model, such as deploying it   on embedded electronics on-board an expensive rocket experiment, would you trust a   model that has been re-trained with the test subset in the final step without being   re-tested on its new performance? Variance (different definitions) I'm new to statistics and reading stats books I found different definitions for Variance.  Definition1: $ s^2 = \frac{1}{n-1} \sum_{i=1}^n (x_i - \bar{x})^2 $  Definition2: $ s^2 = \frac{1}{n} \sum_{i=1}^n (x_i - \bar{x})^2 $  I would like to know why is used different definition for same thing? How do I calculate n modulo 3 in LaTeX? Usually \label does not create any white spaces. However, It creates an white space when \label is used after \phantomsubcaption from subcaption package.   Why? How can I get rid of this white space?   Here is a MWE:  \documentclass{article} \usepackage{subcaption}  \begin{document}  \section{a} a\label{sec:a}b% no white space between `a' and `b'  \begin{figure}   \centering   {a\phantomsubcaption\label{fig:a}}%   {b\phantomsubcaption\label{fig:b}}   \caption{With label}% undesired white space between `a' and `b' \end{figure}  \begin{figure}   \centering   {a\phantomsubcaption}%   {b\phantomsubcaption}   \caption{Without label}% no white space between `a' and `b' \end{figure}  \end{document} I never had this problem until today. When I watch a youtube video everything is fine, until I make the video fullscreen. It actually continues to play perfectly when fullscreen, but when I then exit fullscreen my sidebar and topbar are gone, and the screen is just frozen. Also my cursor is gone. It does seem to respond to ALT-F4, but it takes about 15 seconds to even close the window, and after that everything is unusable (basically frozen). What's strange though, when I re-enter fullscreen after exiting (and unity being frozen) the video plays perfectly still.   For now my workaround is opening tty1 and executing pkill -u username which logs off the user. I have looked at /var/log/syslog but it seems to be empty.  Is this freezing a common problem, if not, how can I make steps to fix this?    EDIT with specs:  I'm on a simple Samsung laptop with:  Ubuntu 14.10 64-bit,  Intel® Core™ i5-3210M,  Intel® Ivybridge Mobile (So integrated intel hd graphics 4000),  8GB ram. I don't think i've ever changed my video drivers, but it's reported as i915.  Ubuntu is up to date, and my browser is Chrome 40.0.2214.91 (64-bit). (Will test out now with firefox, but already posting this because my pc might freeze again)     EDIT 2: It doesn't freeze on Firefox. Will try reinstalling chrome now... EDIT 3: Reinstalling chrome didn't help. Will try chrome 32-bit too now... I want to make the teeth a separate child object from the mouth. I want to know the best way to do this.   I have tried going into edit mode with Tab and trying to select all the vertices but that doesn't move the teeth. Is there an easy way to select just that part and make it a separate child mesh to the rest of the mouth? Official StackExchange app says my question is not available? I recently posted a new question on Android Enthusiasts using the official StackExchange app for Android. Right after posting the question, the app said that my question is not available.     The question is not available, it may have been deleted.   Deleted? Already?...  Then I navigated to my user name to see my recent activity. There it was! I could see the question I just posted. But if I tapped on the link to try to open it, the app kept complaining about my question not being available.     The question is not available, it may have been deleted.   But 7 minutes after posting the question, I could see my question. Here are some screenshots that showcase this issue.      This is not the first time this happens. This appears to be more or less normal behavior of the app. I don't use the StackExchange app very often to post questions. But I had exactly the same message come up when I posted a question a few months ago (and some app version numbers earlier).  This is not a major issue, but you should try to address this nevertheless. It's a small bug, but addressing it might imply much bigger changes... which might explain why it's still present... I don't really know, I'm guessing. I just thought I would let you know about it, in case you are not aware of it.  For the record, the phone is Galaxy S4 Plus (GT-I9506) running Android 4.4.2. Version number of the app is 1.0.50. I'm starting to write a book on . Since I've been contributing on this tag for a long time, I had the opportunity to read &amp; answer several interesting threads on Stackoverflow related to this technology.  I would like to discuss some of the interesting cases published on Stackoverflow in my book, and I wonder if I could use the images and code shared on those threads in it.  I'm hoping somebody from StackExchange could clarify about the copyright status of the material shared on Stackoverflow questions/answers. What is probabilistic programming? For the past year, I've been hearing a lot about Probabilistic Programming (PP) frameworks like  and , and how great PP is. And today, someone shared this link with me:    However, I don't really follow what is special about it since it feels like whatever you can do in PP you can do in any other general purpose language. I'm sure there are technical aspects about PP that make it attractive (e.g. parallel computing), but this aside, is PP really any different from any other language?  Question: I was wondering if there was a consensus of what PP was and how it differs from other statistical-focused software like R, Matlab, Mathematica. It should be noted that PyMC3 and Stan are focused on more Bayesian analysis.  Doing a little research on Google, I came across the following two definitions. The first more abstract, and the second more about PP's technical characteristics.     1.2. Probabilistic Programming Is      Instead, probabilistic programming is a tool for statistical modeling. The idea is to borrow lessons from the world of programming languages and apply them to the problems of designing and using statistical models. Experts construct statistical models already—by hand, in mathematical notation on paper—but it's an expert-only process that's hard to support with mechanical reasoning. The key insight in PP is that statistical modeling can, when you do it enough, start to feel a lot like programming. If we make the leap and actually use a real language for our modeling, many new tools become feasible. We can start to automate the tasks that used to justify writing a paper for each instance.      Here's a second definition: a probabilistic programming language is an ordinary programming language with rand and a great big pile of related tools that help you understand the program's statistical behavior.      Both of these definitions are accurate. They just emphasize different angles on the same core idea. Which one makes sense to you will depend on what you want to use PP for. But don't get distracted by the fact that PPL programs look a lot like ordinary software implementations, where the goal is to run the program and get some kind of output. The goal in PP is analysis, not execution (added emphasis).   --   I'd like to know if the general statistical community agrees with these two definitions of PP, and if there are any other characteristics this definition may be missing. Connecting GSM SIM900A module with Ardunio I have bought an SIM900A Mini V4 GSM module. Here is the module,   I want to configure with arduino to send and receive SMS.   Do I have to connect TXD of this module--Tx of Arduino &amp; RXD of this module--Rx of Arduino or other way around?  There is no datasheet or documents on this new module.  When I search about RXD &amp; TXD, I found this in      TxD means "Data to be transmitted over the comms link" - which will clearly be an input to the modem;    Similarly, RxD means "Data that has been received from the comms link" - which will clearly be an output from the modem.    But I couldn't send or receive SMS using this configurations.  As I am new to this, It would be very helpful if anyone help on this.  Thank you in advance. Drush hangs when trying to bootstrap Drupal (java) ObjectInputStream deserializing wrong version of object Is everything greater than None? Replace background while using HDRI for lighting? How can I replace the background of my scene, but keep the reflections and lighting generated from my HDRI? How to get this only in small letters (lowercase)? I used the following code to give out the category name (without link) in a single post.  How would it be possible for the category name that is given out to only appears in small letters ?  I just think this has to be made with substring, but I dont get it :) Could somebody please help me :)  &lt;?php foreach((get_the_category()) as $category) { echo $category-&gt;cat_name . ' '; } ?&gt; BBWC: in theory a good idea but has one ever saved your data? I'm familiar with what a BBWC (Battery-backed write cache) is intended to do - and previously used them in my servers even with good UPS. There are obvously failures it does not provide protection for. I'm curious to understand whether it actually offers any real benefit in practice.  (NB I'm specifically looking for responses from people who have BBWC and had crashes/failures and whether the BBWC helped recovery or not)  Update  After the feedback here, I'm increasingly skeptical as whether a BBWC adds any value.  To have any confidence about data integrity, the filesystem MUST know when data has been committed to non-volatile storage (not necessarily the disk - a point I'll come back to). It's worth noting that a lot of disks lie about when data has been committed to the disk (). While it seems reasonable to assume that disabling the on-disk cache might make the disks more honest, there's still no guarantee that this is the case either.  Due to the typcally large buffers in a BBWC, a barrier can require significantly more data to be commited to disk therefore causing delays on writes: the general advice is to disable barriers when using a non-volatile write back cache (and to disable on-disk caching). However this would appear to undermine the integrity of the write operation - just because more data is maintained in non-volatile storage does not mean that it will be more consistent. Indeed, arguably without demarcation between logical transactions there seems to be less opportunity to ensure consistency than otherwise.   If the BBWC were to acknowledge barriers at the point the data enters it's non-volatile storage (rather than being committed to disk) then it would appear to satisfy the data integrity requirement without a performance penalty - implying that barriers should still be enabled. However since these devices generally exhibit behaviour consistent with flushing the data to the physical device (significantly slower with barriers) and the widespread advice to disable barriers, they cannot therefore be behaving in this way. WHY NOT?  If the I/O in the OS is modelled as a series of streams then there is some scope to minimise the blocking effect of a write barrier when write caching is managed by the OS - since at this level only the logical transaction (a single stream) needs to be committed. On the other hand, a BBWC with no knowledge of which bits of data make up the transaction would have to commit its entire cache to disk. Whether the kernel/filesystems actually implement this in practice would require a lot more effort than I'm wiling to invest at the moment.  A combination of disks telling fibs about what has been committed and sudden loss of power undoubtedly leads to corruption - and with a Journalling or log structured filesystem which don't do a full fsck after an outage its unlikely that the corruption will be detected let alone an attempt made to repair it.   In terms of the modes of failure, in my experience most sudden power outages occur because of loss of mains power (easily mitigated with a UPS and managed shutdown). People pulling the wrong cable out of rack implies poor datacentre hygene (labelling and cable management). There are some types of sudden power loss event which are not prevented by a UPS - failure in the PSU or VRM a BBWC with barriers would provide data integrity in the event of a failure here, however how common are such events? Very rare judging by the lack of responses here.   Certainly moving the fault tolerance higher in the stack is significantly more expensive the a BBWC - however implementing a server as a cluster has lots of other benefits for performance and availability.  An alternative way to mitigate the impact of sudden power loss would be to implement a SAN - AoE makes this a practical proposition (I don't really see the point in iSCSI) but again there's a higher cost. I'm currently typing a mathematical document which counts many sum symbols. I frequently use the align environment to render equations, although the default behaviour of this environment is to render the equations in displaystyle, which in my opinion wastes vertical space. I therefore have added \textstyle at the beginning of each line of math in this environment, but I'm looking for a more convenient solution.   So is there an environment that is similar to align with the exception it displays textstyle math by default ? Thank you.