Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • One-sample t test comparing mean

    I would like to find out from a dummy variable (0 or 1 in response) that gauges the preference of two methods, which of the two people prefer most. I need to check whether the mean signficantly differs from 50% to know this for sure...

    Can I then just run a One-sample t test on this dummy variable or do you need to use a different kind of test for this?

    For example, I read something that you should only use a t-test if your variable is normally distributed.... of course, a dummy variable is not...

  • #2
    Try the prtest command.

    Comment


    • #3
      Could it be that this gives the same result as the One-sample t test? I know used the one sample test of proportions with hypothesized proportions = 0.5 (the middle of my dummy variable)

      Comment


      • #4
        That can happen since the test statistic is the same and the t distribution looks a lot like a normal if your sample is big. You can also try bitest if that bothers you. It uses the binomial distribution to get the exact p-value.

        Comment

        Working...
        X