I want to compare if there is significant difference between 2 or more groups (independent Variable)...the dependent variable is ordinal. i performed Chi square but its assumption of each cell not having
Dear Salma, if your dependent variable is ordinal then you could combine categories together if you have low frequencies. For example, Strongly agree and Agree can be combined into Agree - Strongly agree, which is still meaningful. Sometimes a 2 by 3 table is optimal with a small sample because you can still have one expected count between 1 and 5 and satisfy the Chi squared validity conditions.
If you only have two groups then Kruskall Wallis degenerates into a Mann Witney U test. The groups can be different sizes but it is recommended that you have at least 10 ordinal categories.
If shapes are different within the group you can still use kurskil walis H test to compare mean rank and you also can for Mann-Whitney U test but this is usually use for two group comparison.
Here is the link below if you want more explanation.
If you have two independent categories use Mann-Whitney U test. I presume your two categories are limited to two values as well and not otherwise. All the best.
If you have two samples / populations only . Check the assumption of normality of this information . If satisfied ( t test ) if not answered (Mann- Whitney ) . For the chi-squared would you be trying to see possible association between these two variables . The fact that smaller cells 5 can be circumvented by Yates correction . Depending on the order of your table one McNemar can also be evaluated.
Since both variables (dependent and independent) are categorical variables, Chi-squared test is preferred. However, as you face small expected frequencies in the cells, the solution should be collapsing (combining) the categories appropriately. If there are still problem of small E even you collapse, final table would reach to 2 x 2 table. You can solve with Fisher's Exact test finally.
I agree that a cross-tabulation (contingency table) is the best way to summarise the relationship between two categorical variables. Most statistical software, notably SPSS, have a "Fisher's exact test" option, which does not assume expected frequencies of 5 or more. The Kruskal-Wallis test was invented for a continuous dependent variable, the problem being that the exact distribution assumes there are no ties; with a categorical dependent variables there will be many ties.