I want to test if two observations of nominal data accord to the same distribution. I am using the chi squared statistics to perform a  and normalize the result with Cramer's $\phi$.  Unfortunately, all the examples for performing a chi squared homogeneity test I could find (e.g. ) perform the test with two one-dimensional observations. The example after the link above, for example, compares boys and girls dependent on their viewing preferences. This makes two observations in the form $[x_0, \ldots, x_n]$. However, I want to test observations in the form $[[x_0, \ldots, x_n], \ldots, [z_0, ..., z_m]]$. I don't know, if "multidimensional" is the right term in this context. I figured it might be.  Could you explain to me, how a chi squared homogeneity test can be performed with multi-row observations? I know it works, because scipy provides unique values for two dimensional input lists.  import scipy.stats as sps observation1 = [[95, 31, 20], [70, 29, 18]] observation2 = [[21, 69, 98], [54, 35, 11]] data = [observation1, observation2] print sps.chi2_contingency(data)   The code above yields (159.18016188570166, 4.772222443744986e-31, 7, array([[[ 69.44008748, 47.45072645, 42.53205358], [ 45.11526642, 30.82876539, 27.63310068]], [[ 76.04085626, 51.96125177, 46.57502446], [ 49.40378984, 33.75925639, 30.25982128]]])) where the first value is chi squared. Flattening the observations yields different values, so there must be a difference.  How do you calculate $\chi^2$ for determining the homogeneity of multidimensional observations? Please note that I know how to calculate $\chi^2$ on a multi-row contingency table. Instead I want to know how to perform a for the homogeneity of two contingency tables.  Example:  Table 1                                   Table 2         outcome0 outcome1 outcome2 sum                outcome0 outcome1 outcome2 action0       95       31       20 146        action0       21       69       98 action1       70       29       18 117        action1       54       35       11     sum      165       60       38 263   Question: Are these observations following the same distribution?  Scipy allows to determine the expected values (and $\chi^2 $) of multi-dimensional observations. The expected values are returned as the last element of its call:  Expected table 1                      Expected table 2         outcome0 outcome1 outcome2            outcome0 outcome1 outcome2 action0    69.44    47.45    42.53    action0    76.04    51.96    46.58 action1    45.12    30.83    27.63    action1    49.40    33.76    30.26   The sum of the squared differences, divided by the expected value, yields the $\chi^2$ value. Note, however, that the expected tables are not just the expected values from each individual table (quick proof for the first cell of table 1: $\frac{146 \cdot 165}{263} = 91.60$). Instead their calculation seems to be somehow dependent on each other.  I'd like to know how the expected values depend on each other, so that I can calculate it myself.
I am having difficulty in how to calculate the Pearson's $\chi^2$ statistic for a contingency table with entries: (3, 0) and (0, 3) (row-wise).  I was studying Agresti's categorical data analysis and found this table. He calculated it as 6.  Through what calculation did he reach this answer?
"find: missing argument to `-exec'" when using "-exec rm -f {}\" What is difference between have/get/make someone do something? Why are my photos not crisp? Show that every group of prime order is cyclic Is it possible to start windows with NUM Lock on? A password is always combination of characters &amp; numbers. I am so much used to num pad that every time windows start I end up entering wrong password just because NUM lock isn't ON by default. Since it's network login, it takes a bit long time to reset &amp; prompt for right password. Is there a way to enable NUM Lock on when Windows loads? Using OpenSUSE leap 15.1 10.2.29-lp151.2.9.1-x86_64 from vendor OpenSUSE (installed)  CREATE TABLE testtab2(     my_id2 INT AUTO_INCREMENT,     name2 VARCHAR(10),     comment2 VARCHAR(20),     PRIMARY KEY (my_id2) );   testtab.txt:  |Roger |hurray   | |George|today    | |Paul  |yesterday| |John  |last year| |Ringo |tomorrow |   LOAD DATA LOCAL INFILE 'testtab.txt' INTO TABLE testtab FIELDS TERMINATED BY '|';   works fine with linenumbers (my_id) 1-5  INSERT INTO testtab (name,comment) VALUES ('Beatles','band');   this gets linenumber (my_id) 8 - should be 6.  If testtab.txt have 8 records and using INSERT INTO 1 record this gets linenr (my_id) 16. This happens in other tables too - one moved from 199 to 256.  Anyone who can solve the problem? I'm far from being a physics expert and figured this would be a good place to ask a beginner question that has been confusing me for some time.  According to Galileo, two bodies of different masses, dropped from the same height, will touch the floor at the same time in the absence of air resistance.  BUT Newton's second law states that $a = F/m$, with $a$ the acceleration of a particle, $m$ its mass and $F$ the sum of forces applied to it.  I understand that acceleration represents a variation of velocity and velocity represents a variation of position. I don't comprehend why the mass, which is seemingly affecting the acceleration, does not affect the "time of impact".  Can someone explain this to me? I feel pretty dumb right now :) I am using XeLaTeX and memoir to write a longer text with several parts, chapters and sections. When printing the \tableofcontents I get a spacing problem with 2-figure numbers almost overlapping the relevant section name, as per enclosed picture.  I am aware that the memoir manual has a section dedicated to this theme, but the most part of it is doubledutch to me. Is there any easy way to avoid this problem? Let $a$ and $b$ be non-zero integers, and $c$ be an integer. Let $d = \gcd(a, b)$. Prove that if $a|c$ and $b|c$ then $ab|cd$. Let $a$ and $b$ be non-zero integers, and $c$ be an integer. Let $d = hcf(a, b)$. Prove that if $a|c$ and $b|c$ then $ab|cd$.   We know that if $a|c$ and $b|c$ then $a\cdot b\cdot s=c$ (for some positive integer $s$). $(ab|c)$  Then doesn't $ab|dc$ since $ab|c$?  I feel like I'm misunderstanding my givens.    Can we say $\operatorname{lcm}(a,b)=c$,  $\operatorname{hcf}(a,b)=d$, and $\operatorname{lcd}(a,b) \operatorname{hcf}(a*b)=a*b$? Thus, $ab|dc$  as $dc = ab$. What do I need for extreme macro photography? I am wanting to venture into some extreme macro photography, specifically insects, such as . After doing some research I have believe that my 1::25 macro lens will be sufficient if I am to use some extension tubes (which I have bought).  I would like to shoot the in the wild, is this possible/likely? Or is this always a catch, then release style of shooting?  Regarding the link I've posted, would this be possible with a 1:25 macro and extension tubes? I have a set of three (21mm, 31mm and 13mm). How would you go about shoot a blue bottle for example? Surely they are going to fly away? Should I use a tripod or will that cause more of a hindrance than a help? Are there any techniques/tricks I could use to get a sharp focus on my subject? Google AdSense Policy Non Compliant "Site Behaviour: Navigation" How to show that $f'(x)<2f(x)$ This is question B4 in 1999 Putnam Exam. I would appreciate if somebody could help me with this.      Let $f(x),f'(x),f''(x),f'''(x)&gt;0$ , $f'''(x)$ is a continuous function and $f'''(x)&lt;f(x)$ on $\mathbb{R}$. Then show that   $$f'(x)&lt;2f(x),~ \forall x\in \mathbb{R}.$$ I wanted to know which php version I am using so I wrote the standard script:   phpinfo();   Which gives me  PHP version 5.6.10   The correct PHP version needed for my application. When I tried in terminal:  php -i   or  php -v   It shows me:  PHP version 5.3.2   Which I don’t need. Then I tried with:  which php   It shows me:  /usr/bin/php   Now I am confused which version of PHP I am using. The files are uploaded to the hosting website and I cannot make any changes to the config files like httpd.conf or php.ini. Can you dispel a magic effect you can't perceive? Discussions about Dispel Magic seem to imply that as long as you can perceive a magic effect in range of the spell, you can try and dispel it.   See  and  from @Miniman:      knowing where it is means that you know where it is. This allows you to use spells like Dispel Magic to remove its invisibility.   But what if you can't perceive it?  Two scenarios come in mind:   In combat, an evil wizard casts Invisibility on himself, walks away from the fray and uses the hide action on his next turn. Since PCs know/assume/deduce he's invisible and certainly in range of the spell, can one use Dispel Magic to end the spell? PCs enter a 80'&times;80' room. Can one declare: "I dispel any Invisibility spell in range", thus revealing one (the closest?) invisible enemy in the room?   What's enough to enable a caster to cast Dispel Magic on a magic effect:    perceiving (seeing, hearing, smelling, etc.) it? knowing/assuming/deducing it's there? or merely suspect/predict it? Why is a Hyperplane called a "Hyper"plane? I just had this curious question. In other fields, the word "hyper" is actually used to refer to something which is "over; beyond; above" as defined by Google. An example of such terms would be Hyperglycaemia, defined by Wikipedia as:     a condition in which an excessive amount of glucose circulates in the blood plasma.   Or Hypersonic, defined by Google as:     relating to speeds of more than five times the speed of sound.   So, my question is, what would be the motive to give a Hyperplane such a name when it is defined as :     a subspace of one dimension less than its ambient space Example images in LaTeX? How to make an example image in LaTeX, a dummy image, a spot holder? I have seen it before, but I can't remember how they would made. It would be nice to be able to use example images - if you should help anyone or you need to question in this community. You might say I could , but I tried - and are obviously too stupid to find anything.  \documentclass[12pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[ngerman, danish]{babel} \usepackage[T1]{fontenc} %\usepackage[]{}  \begin{document}  \iffalse \begin{figure} \includegraphics[scale=1]{•}  \end{figure} \fi  \end{document}   Is it also possible to resize the example image? So I need a usepackage to make an image without including an immage. An placeholder so anyone can try my code without needing images - just needing my tex-code. I hope you understand?  Kind regards! More than 9 hundred as hundreds? In German, we often use "Elfhundert" (literally, "eleven hundred") for 1100 or "neunzehnhundert" ("nineteen hundred") for 1900; but is this correct in English? I would like to add my bibliography to my presentation in IEEE format. What should I add to my preamble and code.  \documentclass{beamer} \setbeamertemplate{footline}[page number]  \usepackage{graphicx} \usepackage{booktabs} \begin{document} \section{Reference} \begin{frame} \frametitle{Reference}  \end{frame}   I'm using the same bibTex which I use to make the IEEE paper. SQL Server CE in a multi user scenario - is this really, really stupid? How to change background and maintain realistic effect? I have like 30 different photos to process like this, but I want to know key things to maintain realistic photo by changing it's background, or maybe just modify background so it would be more pleasing to eye.(If you know tutorial related to my problem, please do provide it to me)  Here is the photo:   Here is my step 2:   Here is background:   Here is the result:   As you can see, it isn't any close to realistic feel. I fooled around with levels, but all I got was this and still it doesn't feels right.  First try:   Second try:   Update  Different background: