Sorry I am a stats newbie, I understood that I can use the search feature, I tried to search but I am afraid that I am not using the right terms and the results returned are not quite relevant to my question.

I have a set of data readings (50 cases), A is a number between [0,1] and B is {yes,no}. My hypothesis / I am trying to show that A does not affect the outcome of B based on my data. May I have some advice what are the right technique / test I should use? Thanks

  • $\begingroup$ "Proving" that A does not affect B may be mighty hard. Most of statistics is oriented at providing evidence that there is an effect. $\endgroup$ – Nick Sabbe Apr 18 '13 at 15:29
  • $\begingroup$ Is there any way I can set null hypothesis and NOT rejecting it? $\endgroup$ – drhanlau Apr 18 '13 at 15:30
  • 2
    $\begingroup$ Not rejecting the null hypothesis is not a strong conclusion: it may just be proof that your dataset was too small to pick up the existing effect. $\endgroup$ – Nick Sabbe Apr 18 '13 at 15:33

Perhaps a visual would help. You may not need a named statistical test. If you use comparative boxplots with whiskers and notches (R), you can visually compare the distribution, median and 95% confidence intervals of the median side-by-side. If there is no significant relationship between the yes/no and the continuous variable, then the confidence intervals should overlap. Another option would be to use comparative density plots to demonstrate that the two distributions are essentially the same.

| cite | improve this answer | |

I think you're after logistic regressoin. This is the general idea of how to do it in R.

# generate some data
xy <- data.frame(A = runif(100, min = 0, max = 1), B = sample(c("yes", "no"), 100, replace = TRUE))
# logistic regression using a GLM
xy.mdl1 <- glm(B ~ A, data = xy, family = binomial)

This will give you the output. Plenty of information on the internet on how to interpret the results, or consult a local statistician.

glm(formula = B ~ A, family = binomial, data = xy)

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-1.2766  -1.1768   0.0004   1.1716   1.2832  

            Estimate Std. Error z value Pr(>|z|)
(Intercept)    0.247      0.402    0.62     0.54
A             -0.497      0.700   -0.71     0.48

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 138.63  on 99  degrees of freedom
Residual deviance: 138.12  on 98  degrees of freedom
AIC: 142.1

Number of Fisher Scoring iterations: 3
| cite | improve this answer | |
  • $\begingroup$ What I am trying to show here is that A has no effect on B. My understanding is if we use logistic regression, we are using A to classify B, which is not really what I want to do here. $\endgroup$ – drhanlau Apr 18 '13 at 15:27
  • $\begingroup$ No, logistic regression is a reasonable way to go about this. However: at best it will give you evidence that knowledge of A does give you knowledge on B. $\endgroup$ – Nick Sabbe Apr 18 '13 at 15:31
  • $\begingroup$ So in my paper how do I draw a conclusion that A has no effect or at least not much effect on B? $\endgroup$ – drhanlau Apr 18 '13 at 15:35
  • $\begingroup$ If the odds ratios are approx. equal, you will state that you found no evidence of statistically significant differences. You can't prove that something doesn't exist. Look at an extreme - how do you prove there is NO diety? You can't, you can only offer evidence that he/she/it exists. $\endgroup$ – Roman Luštrik Apr 18 '13 at 18:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.