Is it valid to conduct a two sample t-test in this situation? I know this is a real easy question, but I'm a little unsecure based on all that I read.
I have a dataset with housing prices across a city. One of the variables also stores the postal-code.
Now what I wanted to do was to first just do some box-plots. And in case I see any larger differences between two postal-code areas I thought about doing a two-sampled t-test between those two. My Ho would be that the means are equal.
My concerns are that there are some assumptions like the independence of the groups. So I just wanted to ask if this is a valid procedure to do. Or would something like this tukey-test or a anova would be more helpful in this case?
 A: Housing prices seem unlikely to be normally distributed so a two-sample Wilcoxon (rank sum) test might be a better choice than a t test. Even
with two distributions of different shapes the Wilcoxon test might
show that housing prices in one part of the city are generally larger
than in another (stochastic dominance).
Moreover, even if housing prices are roughly normal, it seems unlikely that variances of housing prices
would be equal in two parts of the city. so a Welch t test would be a
better choice than a pooled t test.
Depending on your purposes, side by side boxplots for the two parts of
the city might give a clear impression of what you want to show.
Example using simulated non-normal data: Houses in the hills tend to cost more than houses in the flatlands (Prices in hundreds of thousands of dollars.)
A two-sample Wilcoxon test confirms this (with P-value very nearly $0.)$ Boxplots (left in figure) may be sufficient to illustrate the differences. The empirical CDF plots (right panel) show that prices
in the hills tend to dominate (ECDF plot to the right).
set.seed(2020)
flat = rgamma(100, 5, .01)
hill = rgamma(100, 4, .005)   
wilcox.test(flat, hill)

        Wilcoxon rank sum test with continuity correction

data:  flat and hill
W = 2967, p-value = 6.828e-07
alternative hypothesis: true location shift is not equal to 0


R code for figure:
par(mfrow=c(1,2))
 boxplot(flat, hill, names=c("Flat","Hill"), 
         col=c("tan","skyblue2"))
 plot(ecdf(hill), col="blue", main="")
  lines(ecdf(flat), col="brown")
par(mfrow=c(1,1))

A: Absolutely not valid, this is a clear case of multiple comparisons. You need to estimate a mean between all groups if you want to compare specific ones, such as with ANOVA / Tukey.
Regarding independence, I think you can forget about it. Unless you suspect that the houses are somehow related either within a group or between the groups. For ex. if the different postal codes contain specific types of houses (built by the same construction company, owned by the same owner, ...).
