Weigthed chisquare statistics

#1
Dear All, my problem is rather standard I hope. I have a non random sample taken from a clients/doctors database of customers/patients. Independent variable being sex(m/f) and an dependant variable with 2 frequences. (2x2 table) The sample does reflect the general popuplation distribution m/f approx 50/50 which should be common for these particular problems also.

My hunch tells me that I can scale my sample in a sense to reflect the general population i.e transforming the frequences newFreqij = OldFreqij*(0.5)/sampleFreqi, i=m,f, j=1,2 I cannot find a theorethical result to support it so this may be an open problem or somebody has solved this years ago....


Exmpl
Original result
sex
M F tot
smoker 5 30 35

non smoker 20 45 65
tot 25 75 100 distr sex (25M, 75F)

Transformed frequences

sex
M F
smoker 5*0.5/0.25=10 30*0.5/0.75=20

non smoker 20*0.5/0.25=40 45*0,5/0,75=30

looking forward to hear from you

Aleksandar
 

noetsi

Fortran must die
#2
I don't think there is a way to make a non-random sample random if that is what you are trying to do. I have never seen this even suggested.