Questions tagged [proportion]

A proportion is the fraction of some total that is of a particular kind, either (i) as a count of one type of thing out of a total count, or (ii) as a component of a continuous variable.

Filter by
Sorted by
Tagged with
58
votes
2answers
63k views

What is the relationship between a chi squared test and test of equal proportions?

Suppose that I have three populations with four, mutually exclusive characteristics. I take random samples from each population and construct a crosstab or frequency table for the characteristics ...
13
votes
1answer
25k views

Fitting a binomial GLMM (glmer) to a response variable that is a proportion or fraction

I'm hoping somebody can help with what I think is a relatively simple question, and I think I know the answer but without confirmation it has become something I just can't be certain of. I have some ...
10
votes
2answers
10k views

Why use a z test rather than a t test with proportional data?

When testing the difference between 2 proportions why do we use a z-test rather than a t-test? Further, is there a simple way to conduct an omnibus test for significant differences between more ...
9
votes
2answers
3k views

Beta as distribution of proportions (or as continuous Binomial)

Beta distribution is related to binomial being also the distribution for order statistics. Probability mass function of binomial distribution is $$ f(k) = {n \choose k} p^k (1-p) ^{n-k} \tag{1} $$ ...
17
votes
1answer
3k views

At What Level is a $\chi^2$ test Mathematically Identical to a $z$-test of Proportions?

BACKGROUND: Skip safely - it's here for reference, and to legitimize the question. The opening of this paper reads: "Karl Pearson’s famous chi-square contingency test is derived from another ...
25
votes
4answers
40k views

Exact two sample proportions binomial test in R (and some strange p-values)

I am trying to solve the following question: Player A won 17 out of 25 games while player B won 8 out of 20 - is there a significant difference between both ratios? The thing to do in R that ...
13
votes
1answer
11k views

What is the most appropriate way to transform proportions when they are an independent variable?

I thought I understood this issue, but now I'm not as sure and I'd like to check with others before I proceed. I have two variables, X and ...
12
votes
2answers
3k views

The $z$-test vs the $\chi^2$-test for comparing the odds of catching a cold in 2 groups

I just read in a rather well-respected (popular) science magazine (the German PM, 02/2013, p.36) about an interesting experiment (without a source, unfortunately). It caught my attention because ...
1
vote
1answer
569 views

Experimental Design on Testing Proportions

If you wanted to design an experiment to test the proportion of successes under two different strategies, and you had a fixed number of trials -- are you better off balancing the number of trials? (e....
7
votes
2answers
10k views

How to replicate Stata's robust binomial GLM for proportion data in R?

There is an example on how to run a GLM for proportion data in Stata here The IV is the proportion of students receiving free or reduced priced meals at school. The stata model looks like this.: <...
4
votes
1answer
1k views

Difference estimate & confidence intervals for $\chi^2$ test between 2 proportions

I am using a chi-sq test between two proportions (http://statistic-on-air.blogspot.com/2009/07/comparison-of-two-proportions.html). I am using this over the z-test for proportions because I do not ...
3
votes
1answer
3k views

Analysing data measured as proportional composition

I have a data set on the proportional composition of marine substrate for different locations which I would like to compare. For example, one replicate transect within a location may be 50% sand, 25% ...
4
votes
1answer
11k views

Calculate p-value for a negative z

I'm trying to do a hypothesis testing and the result I'm getting is strange because the p value I get is greater than 1. I'm using $p_0= 0.65$ and $\hat{p} = 0.60$. To calculate $Z$ I'm using $(0.60-...
5
votes
1answer
1k views

is the z-test for difference of proportions valid for massive samples with tiny proportions?

Let's say I want to run a difference of proportions test where each side has n=23,000 but their proportions are 0.21% and 0.34%. ...
10
votes
2answers
3k views

Is there a reference that legitimises the use of the unpooled z-test to compare two proportions?

The z-test to compare two proportions is $\newcommand{\p}{\hat{p}}\newcommand{\v}{\mathrm{Var}} z=\frac{\p_1-\p_2}{\sqrt{\v(\p_1-\p_2)}}$. Usually it is defined that $$\v(\p_1-\p_2)=\p(1-\hat{p})(1/...
3
votes
1answer
1k views

Beta regression with “random effect” of source plot in two seasons

I am attempting to model the effect of several continuous and categorical predictors on a continuous proportion response variable. My experiment had 3 treatments, which were replicated in each of 9 ...
4
votes
1answer
3k views

P value and confidence interval for two sample test of proportions disagree

I'm using R to calculate the two-sample test for equality of proportions, where the two proportions are 350/400 and 25/25. So: ...
9
votes
2answers
9k views

How to calculate the standard error of a proportion using weighted data?

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?
9
votes
2answers
2k views

Is it technically “valid” to fit a logistic regression with a dependent variable that is a proportion?

Several posts (here and here) suggest that beta regression is more appropriate when the dependent variable is naturally bounded between 0 and 1. My question is, leaving appropriateness aside, is it ...
5
votes
2answers
1k views

How to test for significant differences in means across four within subject conditions where dependent variable is a proportion?

I have a dataset with four within-subject conditions. Participants gave binary answers to 8 questions in each condition, and these were averaged to form a proportion for each condition. I would like ...
1
vote
2answers
3k views

How to test for equality of means for proportions? And two-sided or one-sided?

I have the following problem: two groups A and B. The proportions of married and single are ($p_1$) and ($p_2$) respectively, and the standard deviations ($s_1$) and ($s_2$). The sample consists of (...
7
votes
1answer
496 views

Standard error of proportion that takes into account population size

Is there another method to estimate standard errors of proportions other than $\sqrt{p(1-p)/n}$ where an estimated total population size is taken into account? For example if I sample 100 out of ...
6
votes
2answers
4k views

Meta-analysis of proportions

I am conducting a meta-analysis on 20 studies. The outcome of interest in each study is represented by a proportion/percentage. The sample size n is known and is different for each study. I have ...
3
votes
1answer
2k views

H to check if proportions in two small samples are the same

I have two small samples denoting if something occured or not. For example: $s_1=\left(1,1,1,0,0,1\right)$ $s_2=\left(1,0,0,0,0,1,1,0\right)$ I want to test if proportions of occuring $1$ are the ...
23
votes
3answers
12k views

Safely determining sample size for A/B testing

I am a software engineer looking to build an A/B testing tool. I don't have a solid stats background but have been doing quite a bit of reading over the last few days. I am following the methodology ...
9
votes
1answer
12k views

R - power.prop.test, prop.test, and unequal sample sizes in A/B tests

Say I want to know what sample size I need for an experiment in which I'm seeking to determine whether or not the difference in two proportions of success is statistically significant. Here is my ...
14
votes
5answers
29k views

Can chi square be used to compare proportions?

I've read that the chi square test is useful to see if a sample is significantly different from a set of expected values. For example, here is a table of results of a survey regarding people's ...
9
votes
2answers
7k views

Empirical logit transformation on percentage data

I have already used the logit transform on my outcome variables (which are displayed in percentages). However, this obviously gives me -INF values and since my data includes a lot of zeros in some ...
6
votes
2answers
7k views

Modelling zero-inflated proportion data in R using GAMLSS

I am new to the gamlss package and would like to check that I am using the correct family for proportion data (tree species cover after treatment), which is bounded ...
10
votes
4answers
9k views

Confidence interval for a proportion when sample proportion is almost 1 or 0

I know there are methods to calculate a confidence interval for a proportion to keep the limits within (0, 1), however a quick Google search lead me only to the standard calculation: $\hat{p} \pm 1.96*...
4
votes
1answer
11k views

Chi-square test or Z-test for comparing two proportions?

On this website the appropriate statistical test for comparing two independent proportions is described as a $Z$-test (a normal distribution is used to obtain a $p$-value). However, in R ...
11
votes
4answers
7k views

Why is it not OK to do a Pearson correlation on proportion data?

An online module I am studying states that one should never use Pearson correlation with proportion data. Why not? Or, if it is sometimes OK or always OK, why?
6
votes
1answer
5k views

Regression when the dependent variable is between 0 and 1

I am using the scikit-learn library to perform regression. However in my case I need the dependent variable to be constrained in the range 0 to 1. The dependent variable represents count proportions ...
6
votes
4answers
3k views

Why is the empirical cumulative distribution of 1:1000 a straight line?

Why does plot(ecdf(1:1000)) produce a straight line? Since Fn($x_n$) = $x_1$/(total sum) +$x_2$/(total sum) +...+$x_n$/total sum = ($x_1+x_2+x_3+...+x_n$)/total sum. the fact that Fn(200) roughly ...
5
votes
1answer
4k views

Generalized linear models with continuous proportions

We are having problems running generalized linear models with proportional data. For example, we have data like this: ...
5
votes
1answer
4k views

Hypothesis testing for 2 proportions - for A/B testing

I was trying to understand the statistical tests to use during A/B testing and stumbled upon this documentation of the Amazon A/B testing SDK: https://developer.amazon.com/public/apis/manage/ab-...
4
votes
1answer
779 views

Test of proportions or chi-squared? [duplicate]

These data are from an A/B test of free trials to conversion. Someone can sign up for a 30 day free trial of the product. If they like it they stay on and become paying customers. By default (A), when ...
4
votes
1answer
4k views

Determining sample size when given Confidence Interval and margin of error in a finite population

I'm trying to determine n, the sample size. We have $N=580$ and we want to estimate population proportion, $p$, at a 95%-CI and a margin of error of $0.10$, then I get $$n=Npq / (N-1)D + pq$$ ...
3
votes
1answer
262 views

Test of proportions when sample size is not known

I want to compare two proportions, say $p_1$ and $p_2$. I want to test the null that $\pi_1 = \pi_2$ where $\pi_i$ is the true unknown proportion for sample $i$. The problem is that I do not know the ...
3
votes
1answer
730 views

Assessing whether differences between datasets are significant

I am unsure which statistical test I should use to test whether two datasets are significantly different. The data looks something like this: ...
3
votes
2answers
464 views

Understanding the formula for the Confidence Interval of the difference between two sample proportions

I'm having trouble making sense out of the formula $$(\hat{p}_1-\hat{p}_2) \pm 1.96 \sqrt{\frac{\hat{p}_1 (1-\hat{p}_1)}{n_1} + \frac{\hat{p}_2 (1-\hat{p}_2)}{n_2}}$$ Is the idea that the sampling ...
2
votes
1answer
4k views

Wilcoxon signed-rank test for proportion variable response?

My response variable is a proportion. The explanatory variable is categorical with two levels which are not independent. The distribution of the response variable is different from normal. ...
2
votes
2answers
3k views

How can I test the difference between a population proportion and sample proportion?

A report says that 82% of British Columbians over the age of $25$ are high school graduates. A survey of randomly selected residents of a certain city included $1290$ who were over the age of $25$, ...
1
vote
0answers
791 views

Proportions (compositions) in logistic regression

I have a logistic regression where some of the independent variables are proportions (compositions) that sum to 100 percents. Let's say that I have 4 such variables - I have ran the regressions 4 ...
7
votes
1answer
3k views

What is the standard error for the distribution of the difference in proportions (for hypothesis testing)?

I am looking for the standard error for the distribution of the difference in proportions for hypothesis testing when the null hypothesis is that the two proportions are different by a constant. Let'...
6
votes
2answers
866 views

What is wrong with one tailed z-tests for a proportion?

After answering How to analyze observed vs expected when expected is just a proportion? by suggesting that the OP uses a one tail Z-test for their proportion data, I got into a debate in the comments ...
3
votes
1answer
300 views

Time Series of Wound Healing percentages / proportions

I am looking at wound healing over time and have hit a wall with analysis. My data consist of injury cases which are tracked over time. Injury healing is measured as percentage wound area/perimeter ...
3
votes
2answers
305 views

An intuitive example for why sample size is maximum when probability is 0.5

In computing sample size for qualitative research (e.g. a confidence interval for an estimated proportion) as follows: $$n=\frac{Z^2P(1-P)}{d^2}$$ \begin{eqnarray}\text{where }\,n&=&\...
1
vote
1answer
131 views

Measurements from two raters. Should I use multilevel/“random-effects” model?

I have several variables that were measured on patients, for most patients the variables of interest were measured by 2 independent "raters". Most of the variables are binary. I need to compute the ...
1
vote
1answer
94 views

Inferential statistics on mass fractions (continuous proportions)

I have the following dataset: ...