# Questions tagged [chi-squared]

A test (typically of distribution, independence, or goodness of fit) or a family of distributions related to such a test.

1,995 questions
2 views

### Feature Selection Pipeline - Combining PCA and SelectKBest with Chi2 Test

This example applies a Feature Union using both PCA and SelectKBest: https://scikit-learn.org/stable/auto_examples/compose/plot_feature_union.html#sphx-glr-auto-examples-compose-plot-feature-union-py ...
17 views

### Bayesian chi-squared tests

I have a dataset with two groups of participants. Each participant performed a repeated measures task on which three types of errors could be made. I want to measure the difference in distributions of ...
19 views

### Rounding numbers in a $\chi^2$ test

I wanted to ask about rounding numbers in my $\chi^2$ test for discrete real-world values. Sadly, teacher wants to see if I was tossing my coin fairly (and by my own hand) for a previous statistics ...
47 views

### How to calculate a chi square for this data set?

This is my data set called mother. ...
109 views

### Why do the critical values of the chi-square distribution increase with degrees of freedom?

This makes no sense to me since we usually want more degrees of freedom and the t-and F-distributions reflects this by demanding smaller critical values for significance. The tables I have found only ...
8 views

### How to analyze difference in answers between groups across multiple Likert questions? Categorical PCA and Chi Sq?

I'm analyzing this dataset from UCI ML Repo. It's on the perception of Wikipedia amongst university professors/instructors. I'm looking to test the differences between departments in their answers to ...
30 views

### Did I do this $\chi^2$ test for discrete uniform distribution correctly?

I had to test if a certain lottery based on choosing numbers is fair – whether the distribution of winning numbers is uniform. In this lottery you pick six numbers from 1 to 49. Six numbers are then ...
71 views

### What does it mean exactly to divide a distribution by another distribution?

In the notes I'm working through, distributions are often "divided" by other distribution, and while I sort of understand what is meant, i would rather a rigorous explanation. Let me provide an ...
12 views

### Likelihood ratio tests for quasi- models

I have been playing around with over-dispersion in binomial data and looking into qausi-binomial models as a solution. When comparing binomial models through the change in deviance, I can reproduce ...
12 views

### When to use chi squared, kruskal-wallis and mann whitney u tests for statistical analysis? [closed]

We are currently conducting a study on the public perceptions regarding data collection for mental health smartphone applications. We have collected data through survey questionnaires and are trying ...
30 views

### Confidence interval for population variance and chi-square distribution [closed]

At present, i am reading the e-book by Robert L. Mcdonald(Professor of Finance,Northwestern University's Kellogg school of Management) named $"Derivatives Markets" 3rd Edition.$ In that book, I didn'...
24 views

### Degrees of freedom in Chi-squared test of homogeneity

Assume a contingency table $I\times J$, which consists of counts of multinomial r.v. with $I$ categories from $J$ populations with fixed marginal totals $n_{\cdot j}=\sum^I_{i=1}n_{ij}$ for each ...
41 views

### When to use Chi-squared and when Z test for categorical variables?

The problem is: There was a survey conducted among 1137 adults from California, Nevada, and Oregon. They were chosen randomly and they answered to the following question “Do you think Marijuana ...
16 views

### Are the classic assumptions for Chi 2 test still valid?

For a 2*2 table, I want to use Chi 2 test Are the classic assumptions (1# more than 80% of the contingency cells having expected values ­> 5, 2# no zero in the cells ) are still valid? Is existence of ...
20 views

### Chi-Square Degeneracy for Large Sample

(Forgive my hand-waving explanation) When discussing anomaly detection methods (for example), one possibility is comparing the distance of a point from a centroid: Given 100 samples $X_1,...,X_{100}$ ...
14 views

### Chi Square Test for Dimensionality Reduction

According to many resources, we should have categorical variable to be able to apply chi square test. ...
20 views

### Python: compare 2 discrete distributions

Lets say I have a population consisting of items A, B, and C. I dont know the distribution ...
23 views

### What is the appropriate test when dependent variable is ordinal binary and independent variable is continuous?

I am curious what is the most appropriate test to use when the outcome variable is an ordinal binary (test score of pass or fail) with a set of four unordered treatment conditions (A,B,C,D) as the ...
53 views

### Statistical test for multiple reponses?

I ran a survey and one question was to indicate which accommodation (hotels, apartment, b&b, ...) respondents prefer when travelling. Thery were allowed to select more than one option. The survey ...
26 views

### Goodness of fit measurement in Python

I have a (pretty noisy) 1D array of data in Python that I fit a linear function to -- see plot below. The x-axis is a wavelength scale. I would like to measure the "goodness of fit" of this new line ...
8 views

### Chargaff's rule and degrees of freedom of the chisquare

I have a question regarding if and how one should take into account for the extra knowledge that he/she has of a model when determining the degrees of freedom of a distribution, in my case the chi-...
15 views

### Are the Peason's chi-square test and the -2-log likelihood ratio chi-square test expected to give different p-values?

I am trying to calculate a p-value after fitting a distribution to some data. In one way, I use the Pearson's chi-square test and get a p-value=0.369. I then use the log-likelihood ratio method and ...
18 views

### What is the specific normalization chi2 in seqdist?

In the documentation for the seqdist() function it is noted that there is "...a specific normalization for"CHI2" and "EUCLID". See the Details section." (p.60). But in the details section there is no ...
8 views

### conditional trees unexpected grouping — differences with chi squared test

I grouped some data with ctree (party package, conditional trees) (binary target) and the result is: ...
22 views

### Comparing percentages with unequal sample sizes

I've spent some time collecting participation data on a schools competition. To sum it up: Roughly speaking 1000 schools take part in the initiative every year. Only 10 schools become finalists. ...
162 views

I came across the following in some old class notes of mine: if $\chi_{v_{1}}^{2}$ is independent of $\chi_{v_{2}}^{2}$ then $\frac{\chi_{v_{1}}^{2}}{\chi_{v_{1}}^{2}+\chi_{v_{2}}^{2}}\backsim ... 1answer 35 views ### Chi-square goodness of fit with few categories I am trying to compare observed proportions to expected proportions. To me, they seem quite different but chisq.test stubbornly returns fairly high p-values. I ... 0answers 8 views ### Statistical significance in a sub contingency table I have a contingency table of data for the twelve months of the year (i.e., a 2 x 12 table), and I want to evaluate the difference between two particular months (the probability of their values being ... 1answer 39 views ### Test of uniform distribution using KS-test and chi square in R I want to test if a given sample$x$of$n = 500$continuous observations is uniformly distributed on a given interval of$[a,b]$($a = min(x)$and$b = max(x)$). Therefore I would like to compare the ... 0answers 14 views ### Confidence interval of Poisson distributed MLE using chi squared There is a variable distributed as$X$~Poisson$(X_0 e^{-\lambda t})$. The value of$\lambda$was estimated through maximum likelihood by fitting to the data$t=0,1,2,3,4$and$X=[5000,3000,100,10,1]$. ... 1answer 33 views ### How to find if people's preference is significant I am trying to find out the wheither people prefer ads on Instagram or Facebook. As in are they more likely to choose x or y? Each person is given if you had to choose from and they pick x or y. ... 0answers 12 views ### Chi Square embedded in an ANOVA model? I have treatment->outcomes count data, which is obviously modeled by a chi squared, but there are several separate ones, let's say 3. I could run 3 separate chi squares, but I want to ask what would ... 0answers 16 views ### Independence test with priors Say you are selling a product, and you know from experience that the green version of the product sells better than the blue version. But you have two types of customer A and B, and you want to know ... 1answer 20 views ### Why do we use natural logarithm in categorical outcome variables I'm reading a chapter on categorical outcome variables (chi-square & log linear analysis) and the author, in an effort of fitting a linear model, said that because the outcome variable is a ... 0answers 8 views ### Can I perform chi-square test between a dichotomous variable and a categorical variable with more than two categories? My dependent variable is 'Malnutrition' (Yes, No). Independent variable is 'Wealth-index' (Poor, Poorer, Middle, Richer, Richest). Can I perform a chi-square test with 'Malnutrition' and 'Wealth-... 1answer 33 views ### What test to use when a chi-squared assumption is violated but my contingency table only has one row? I have some data of lizard counts near rock piles of different types that I'm trying to analyse. There are three different types of rocks (control, design 1, and design 2) and I have a lizard count ... 3answers 111 views ### Why is there a change in the number of degrees of freedom when the following modification is made? In the notes that I'm working through it says the following: "Let$X_1,...,X_n$be a random sample from$N(\mu,\sigma)$$$\sum^{n}_{i=1}\Bigg[\frac{(X_i-\mu)}{\sigma}\Bigg]^2$$ has a$\chi^2$... 0answers 5 views ### predict important markov chains(paths to an event) with confidence I need help in validating my current approach as well as find any alternative approaches I could use in order to tackle issues like below. I have a dataset like below and I need to find important ... 0answers 23 views ### Compare sales data over time in sequence I am very new to stats, please advise how should I approach to solve the below problem. I have data like : My objective is to see how customers are spending from one Quarter to the next Quarter. I ... 1answer 23 views ### Chi square test when sample sizes are different? I have two samples from two different language corpora: Sample one contains 82 verbs, sample 2 contains 89 verbs. I want to compare the frequencies of a particular verb type, let's call them oral ... 2answers 65 views ### definition of chi-square statistic The chi-squared statistic is defined as $$\chi^{2} = \sum_{i=1}^{N} \frac{(O_{i} - E_{i})^{2}}{E_{i}}$$ The$O_{i}$is observed value and$E_{i}$is expected value. But ... 0answers 28 views ### Analyze categorical data when there cannot be “negative” influence Suppose there are 1000 items given 5 labels [A,B,C,D,E]. You observe [750,200,25,25,0]. You want to find out whether items are biased towards being given certain labels. In a standard chi-squared ... 1answer 23 views ### Chi-square based tests tending to zero for large sample sizes [duplicate] I think I have some misconception about chi-square based tests such as Pearson's test or McNemar's test. The way the tests are defined, the test statistics produced by the formulas are not stable ... 2answers 14 views ### Compare model fit (-2 log likelihood), is my model significantly better? I have 6 models with -2 log likelihood as an indication of model fit. The fit increases from model 1 to 6, with model 1 having the worst fit (lowest -2 log likelihood) and 6 the best fit. How do I ... 0answers 9 views ### Chi-Squared test or another? 16 subjects, 133 comments divided into 2 dichotomous categories I have 16 subjects that rated and commented on two essays (essay 1 and essay 2). I have categorized the comments into 2 dichotomous categories: 1. Non-vocabulary VS Vocabulary comments (basically ... 0answers 72 views ### Does a high Chi square p-value for a whole model mean it is insignificant if likelihood ratio tests indicated variables should be added? I've been estimating lots of versions of the same model by incrementally adding variables. With some variables, if I add them to the model, the likelihood ratio test indicates that they are ... 1answer 14 views ### Chi-Square 2x2 Contingency vs z-test for two proportions: parametric or non-parametric? Chi-Square Test I think it is generally agreed upon that the Chi-square test (specifically, the chi-square test for a 2-by-2 contingency table) is a non-parametric test. (Though there is the ... 0answers 14 views ### Interpreting$p\$-values and Chi square when variables are added to a model in maximum likelihood estimation

I'm running a maximum likelihood estimation (probit) and I'm experimenting with adding additional variables, walking the bias-collinearity tightrope. Please could someone explain to me intuitively ...