I have a test and control group in which I tested the impact of a sale on baseline revenue across a 3 week period (test received sale, control did not).        Control Test 1/1/2017    4   3 1/2/2017    3   4 1/3/2017    1   3 1/4/2017    2   3 1/5/2017    2   4 1/6/2017    1   7 1/7/2017    10  3 1/8/2017    2   3 1/9/2017    2   3 1/10/2017   2   3 1/11/2017   3   4 1/12/2017   1   5 1/13/2017   4   3 1/14/2017   3   4 1/15/2017   2   4 1/16/2017   1   4 1/17/2017   5   3 1/18/2017   3   4 1/19/2017   2   4 1/20/2017   1   6 1/21/2017   5   5 1/22/2017   7   5   I am using an independent t-test to analyze.  My question: Since I am measuring across multiple days, do I require a Bonferroni (or some other) correction?  The p-value is .037873 which is currently sig. but would not be using a correction.
I am trying to test the impact of a sale initiative on store revenue. I have created 10 matched pairs of stores and then randomly distributed one store in each pair into a test or control group.  I then ran the sale for 21 days within the test group (keeping control constant) and measured relative lift in revenue compared to baseline.  My questions  1.) Should I be using a paired t-test based on the previous store matching  2.) Should I be measuring across each day of the test such as:          Control Test 1/1/2017    4   3 1/2/2017    3   4 1/3/2017    1   3 1/4/2017    2   3 1/5/2017    2   4 1/6/2017    1   7   Or measuring across my paired markets such as:                 Test Control Market Pair 1   10  5 Market Pair 2   8   3 Market Pair 3   5   1
How to properly establish a PostgreSQL connection using QgsCredentials I'm trying to establish a Postgres connection using QgsCredentials as described here:    The only problem is that I cannot establish a working connection unless I "physically" add the layer to the map canvas (which I don't want because I only want a connection to the DB and a reference to the layer which will be edited later on in the code)  When clicking a button the run function reads:  uri = QgsDataSourceURI() connInfo = uri.connectionInfo()  (success, user, passwd) = QgsCredentials.instance().get(connInfo, None, None)  if success:     # Isn't this enough to establish the connection and get a valid reference to the layer?     uri.setConnection("HOST", "PORT", "DB_NAME", user, passwd)     uri.setDataSource("SCHEMA", "TABLE_NAME", "the_geom")     LYR = QgsVectorLayer(uri.uri(), "LYR", "postgres")      # Unless I add the following line, I am not able to use properly the object     # (which asks the user the credentials until he/she inserts the right ones and gets     # a working connection with a valid reference to the layer)     QgsMapLayerRegistry.instance().addMapLayer(LYR)   What am I doing wrong?  Thanks in advance,  m. How is exponentiation defined in Peano arithmetic? How would exponentiation be defined in Peano arithmetic? Unless $n$ is fixed natural number, $x^n$ seems to be hard to define.   Edit 2: So, what would be the way to define $x^n+y^n = z^n$ using $\Sigma_1^0$ formula?  Edit: OK, I say Peano arithmetic has addition and multiplication stuffs. This allows additions to be expressed without quantifiers but as for exponentiation Peano arithmetic is silent. That's why I asked this question. Just for clarification. Best way to simulate "group by" from bash? How can I remove duplicate rows? What is the best way to remove duplicate rows from a fairly large SQL Server table (i.e. 300,000+ rows)?  The rows, of course, will not be perfect duplicates because of the existence of the RowID identity field.  MyTable  RowID int not null identity(1,1) primary key, Col1 varchar(20) not null, Col2 varchar(2048) not null, Col3 tinyint not null Let $x_n$ be a sequence of the type described above. It is not monotonic in general, so boundedness won't help. So, it seems as if I should show it's Cauchy. A wrong way to do this would be as follows (I'm on a mobile device, so I can't type absolute values. Bear with me.) $$\left|x_{n+1} - x_n\right| \leq \frac{1}{n^2}.$$ So, we have $$ \left|x_m -x_n\right| \leq \sum_{k=n}^{m} \frac{1}{k^2}$$ which is itself Cauchy, etc., etc. But, of course, I can't just use absolute values like that. One thing I have shown is that $x_n$ is bounded. Inductively, one may show $$ \limsup_{n \to \infty} x_n \leq x_k + \sum_{k=n}^{\infty} \frac{1}{k^2},$$ although I'm not sure this helps or matters at all. Thanks in advance.  Disclaimer I've noticed that asking a large number of questions in quick succession on this site is often frowned upon, especially when little or no effort has been given by the asker. However, I am preparing for a large test in a few days and will be sifting through dozens of problems. Therefore, I may post a couple a day. I will only do so when I have made some initial, meaningful progress. Thanks. I have just started studying implication in mathematics. So, you'll probably have an idea of where my confusion lies right from the get go.  In the truth table, where $A \implies B$ we obtain this result:  A   B   T/F ___________ T | T | T T | F | F F | T | T F | F | T   Now, my confusion here is regarding why $A\implies B$ given A is false, and B true. The others I understand. The first and last one are obvious, the second one implies, to me anyway, that given A implies B, the truth of B rests upon the truth of A, B is false, A is True, which cannot be, thus not B given A is false.  Now... then, why is B true despite the fact that A is false? Or rather, why is the statement B given not A, True. The truth of B is implied from the truth of A, but A is a false statement. So it's very contradictory that this may be, and in fact, if you go through a real life example, you would find that the third statement seems to be false.  Say $A$ is the statement that it is dark outside, and $B$ the statement that the sun is not on our side of the earth. If it is not dark outside, than stating that the sun is on the other side of the planet must be wrong (in my example i'm going to claim that the sun is the only light source).  Side note:  I just had a thought, if A is false, does that mean you can conclude... mmm, whatever? I mean, B is implied via the truth of A, if A is false, B is NOT implied, but then B could be EITHER true or false, I suppose. Is this correct?  However, would that not mean that A does not imply anything when false. Would that not set the 3rd and 4th statement to be undefined? PHP Function with Optional Parameters I am using 64bit 2.10.1-Pisa on Windows 10.  When I set up my composer to print, everything looks fine until I try to print or export. The composer goes completely blank and outputs a corrupted PDF using the Export to PDF function. The PDF file won't even open.  I had the same result exporting to PNG.  When I try to use the PDF document printer instead of exporting, QGIS stops responding indefinitely. $x,y,z$ are independent and uniform random on $[0,1]$.  I know that $P(x \geq yz) = 3/4$ by triple integrating the triple density function.  However, is there a easier way to get this solution? Without triple integration. How many connected graphs over V vertices and E edges? Is there a way to calculate the number of simple connected graphs possible over given edges and vertices?   Eg: 3 vertices and 2 edges will have 3 connected graphs But 3 vertices and 3 edges will have 1 connected graph  Then 4 edges and 3 will have 4 connected graphs  Till such values...it is easy to see its  V choose E  But what about when the number of vertices are less than number of edges...how to calculate then?  I am not able to visualize that  Can it be a variation of the Stars and Bars problem  Like...number of ways 7 edges(balls) can be connected to (kept in) 5 vertices(bags) such that no vertex(bag) is isolated (is empty)  Here maybe we might have to consider the number of edges twice as each edge needs two vertices... If $f$ is a concave function and $f(0) \geq 0$ then $f(a+b) \leq f(a) + f(b)$ for all $a,b >0$ Beamer: Blackboard theme and overlays I am currently preparing my beamer presentation for my PhD defense.  I took the example at the url  to get a black board style presentation.  This template includes a short script which uses a random-generator to randomly scatter dust-trails on the black background to mimic chalk traces (see MWE below).  The thing is that parallel to that, I am also using overlays to uncover my slide layout by layout. The script is executed each time I am using a layout command which slows down the compilation quite substantially. I am not so familiar with control statements in latex, so here is my question:  How can-I modify this script for the background to be refreshed only when the slide is over, and not after each layout command?  Remarks:  1) I am using the Augie font, but I didn't included it in the MWE so that it can be compiled more easily  2) In case, it should make a difference I am also using the \begin{textblock*} \end{textblock*} environment from the textpos package to position text on the slide.  Here is my MWE:   \documentclass[10pt,mathserif]{beamer}  \usepackage[francais,english]{babel} \usepackage[utf8] {inputenc} %for ISOlatin1 (8859-1) sources \usepackage[T1] {fontenc}      %for polices DC 8bits   %%%Fancy fonts %\usepackage{emerald} %\usepackage{eulervm} %%%  %%Extra packages \usepackage{amsmath} \usepackage{amsfonts} \usepackage{tikz} \usetikzlibrary{arrows,shapes} \usepackage[absolute,overlay]{textpos}    %set text colors for different objects \setbeamercolor{frametitle}{fg=white} \setbeamercolor{structure}{fg=white} \setbeamercolor{normal text}{fg=white} \setbeamercolor{alerted text}{fg=white} \setbeamercolor{example text}{fg=white}   %%Black background \setbeamercolor{background canvas}{bg=black}    %%%%%%%%%%%%%%%%%%%%%% %%%%%Script: Random Dust Trails%%%%%%%%%%%%%%% \pgfmathsetseed{\number\pdfrandomseed} % seed for random generator \setbeamertemplate{background}{     \begin{tikzpicture}         \useasboundingbox (0,0) rectangle (\the\paperwidth, \the\paperheight);        \foreach \i in {1,...,30} {             \pgfmathsetmacro{\x}{random(0,10000)/5000-1}%             \pgfmathsetmacro{\y}{random(0,10000)/10000-0.1}%             \pgfmathsetmacro{\r}{random(0,10000)/1000-5}%             \rotatebox{\r}{                 \pgftext[at=\pgfpoint{\x\paperwidth}{\y\paperheight}, left, base]{\includegraphics[width=\textwidth]{paintstroke.png}}             }         };      \end{tikzpicture} } %%%%%%%%%%%%%%%%%%%%%%  %%No navigation bar \setbeamertemplate{navigation symbols}{}  \begin{document}      \begin{frame}          \begin{itemize}             \item&lt;1-&gt; bla slide 1             \item&lt;2-&gt; blu slide 1             \item&lt;3-&gt; blub slide 1         \end{itemize}      \end{frame}  %%I want the background to be refreshed with the Dust Trails script only at the end of the frame          \begin{frame}          \begin{itemize}             \item&lt;1-&gt; bla slide 2             \item&lt;2-&gt; blu slide 2             \item&lt;3-&gt; blub slide 2         \end{itemize}      \end{frame}  \end{document}   This is my first post, so please be kind if I did something illegal on the formatting of the message ;-).  Thanks in advance,  Yannick I've lost a command block, how can I find it? I've placed a command block making it day all the time. I want to turn it off, but I've lost it. What's the quickest way to find it? Timeline vote summary shows votes for the 24 hours following the timestamp, which is confusing The new timeline is pretty snazzy. But there's one thing I've noticed that's a bit jarring; the timestamp for vote summaries is always 0:00:00 on a particular day, and the summary covers the rest of that day. So you end up with a summary that always shows up earlier than the events that presumably triggered the votes that show up in it.  A simple solution is to have it display 23:59:59 instead, and sort accordingly. This way the summary comes in after the events it summarizes. What is the difference between 'git pull' and 'git fetch'? It's $\mathbb{Z}\subseteq \mathbb{Z}[X]/(X^5-1)$ an integral extension? It's $\mathbb{Z}\subseteq \mathbb{Z}[X]/(X^5-1)$ an integral extension?  $\mathbb{Z}[X]/(X^5-1) \simeq \mathbb{Z}[x]$ where $x^5-1=0$.  So is an integral extension because $x$ is integral  over $\mathbb{Z}$. It's right? US doctor working in Tripoli wants me to open online account Travel duration from Earth to a star at 9.8 m/s² acceleration Why not use exceptions as regular flow of control? Installing Ubuntu after Windows 10 How can I install Ubuntu on Windows 10 as dual boot? I have a DVD with Ubuntu and when I tried to install Ubuntu I had a warning that the hard disk will be erased. How can I install Ubuntu and keep my Windows 10? Thanks