# 2 independent categorical variables. What test do I use?

#### user127

##### New Member
Sorry if this has been asked before, if it has I couldn't find it. Also excuse me if I mix up terms, I'm a bit of a novice.

My experiment had two categorical independent variables.
1.)The feeding history of the fly (protein fed or sugar fed)
2.)The type of substrate tested for preference (meat, synthetic protein, blood, sucrose, fructose, dextrose, water)

And one dependent variable
1.) The amount of time the fly spent in contact with the substrate

To clarify in my experiment there are six flies in six separate petri dishes. 3 of the flies were previously sugar fed. 3 of the flies were previously protein fed.
Of the sugar fed flies 1 is exposed to a water soaked strip of gauze, 1 to a protein containing strip of gauze and 1 to a sugar containing strip of gauze.
Likewise for the other set of three flies.

What is the appropriate statistical test to use?
Thanks for any help

#### tester1234

##### New Member
Hi user127,

For deciding what would be an appropriat test you first need to tell us what your test tried to prove, verify or show.

I am making a guess here. You wanted to test which fly is the heaviest when fed with sugar or protein via a certain gauze. Then you want to verify that the differenzes are not random but significant. I do not know if this is possible as you only have one value for each of the six combinations. Isnt this a sample to small for statistical analysis?

#### user127

##### New Member
Hi user127,

For deciding what would be an appropriat test you first need to tell us what your test tried to prove, verify or show.

I am making a guess here. You wanted to test which fly is the heaviest when fed with sugar or protein via a certain gauze. Then you want to verify that the differenzes are not random but significant. I do not know if this is possible as you only have one value for each of the six combinations. Isnt this a sample to small for statistical analysis
Yes, the sample is undoubtedly too small, but this is just for an assignment teaching us how to write lab reports. It's not actual research. I wanted to measure which substrate is the best fly attractant. So I want to verify that the amount of time the fly spent on the gauze is significant and not random.
I actually have data for 5 trials with each substrate. A total of 120 trials were run.

Last edited by a moderator:

#### noetsi

##### No cake for spunky
You can use regression with dummy variables. Or two way ANOVA as miner mentioned. It is the same thing. The form your IV take does not really matter in either method.

#### tester1234

##### New Member
Hi user127,

Yes, the sample is undoubtedly too small, but this is just for an assignment teaching us how to write lab reports. It's not actual research. I wanted to measure which substrate is the best fly attractant. So I want to verify that the amount of time the fly spent on the gauze is significant and not random.
I actually have data for 5 trials with each substrate. A total of 120 trials were run.
Thank you for clearing that up!