Hi,
I am facing a question regarding a potential discrepancy in summary statistics. I have a variable called "cost" and another one called "amount". I create a variable x defined as amount/cost and another variable x1 defined as cost/amount. I then compute x and x1 for different categories of a variable (I show this below). My question is -- if there are five categories of a variable and the order of mean of x is a>b>c>d>e, should the order of x1 not be a<b<c<d<e, since x1 is the reciprocal of x? I am not finding this pattern in my data . Following is my data example and my results from stata:
****** data example
input str24 category int(cost amount) float(x x1)
"d" 8 1621 202.625 .004935225
"d" 8 1621 202.625 .004935225
"d" 8 1621 202.625 .004935225
"d" 8 1621 202.625 .004935225
"d" 8 1621 202.625 .004935225
"d" 8 1621 202.625 .004935225
*** Summary statistics
sum x x1 if category=="a"
Variable | Obs Mean Std. dev. Min Max
-------------+---------------------------------------------------------
x | 31,970 116.7878 99.97373 5.7 458.15
x1 | 31,970 .0167 .0172016 .0021827 .1754386
. sum x x1 if category=="b"
Variable | Obs Mean Std. dev. Min Max
-------------+---------------------------------------------------------
x | 76,177 205.8899 131.6166 .25 608
x1 | 76,177 .021 .2244434 .0016447 4
. sum x x1 if category=="c"
Variable | Obs Mean Std. dev. Min Max
-------------+---------------------------------------------------------
x | 34,355 76.30404 50.26179 7.5 616.3333
x1 | 34,355 .0196287 .0149936 .0016225 .1333333
. sum x x1 if category=="d"
Variable | Obs Mean Std. dev. Min Max
-------------+---------------------------------------------------------
x | 5,403 380.9771 195.2229 71.5 800.2
x1 | 5,403 .0042572 .003721 .0012497 .013986
. sum x x1 if category =="e"
Variable | Obs Mean Std. dev. Min Max
-------------+---------------------------------------------------------
x | 31,906 255.0561 194.5661 20 1272
x1 | 31,906 .0071702 .0081141 .0007862 .05
.
*********
In this case, the mean of x for category a is 116.7878 and the mean of x for category b is 205.8899. However, the mean of the reciprocal of x , which is x1, is lower for a than b. Why is this the case? Thank you.
I am facing a question regarding a potential discrepancy in summary statistics. I have a variable called "cost" and another one called "amount". I create a variable x defined as amount/cost and another variable x1 defined as cost/amount. I then compute x and x1 for different categories of a variable (I show this below). My question is -- if there are five categories of a variable and the order of mean of x is a>b>c>d>e, should the order of x1 not be a<b<c<d<e, since x1 is the reciprocal of x? I am not finding this pattern in my data . Following is my data example and my results from stata:
****** data example
input str24 category int(cost amount) float(x x1)
"d" 8 1621 202.625 .004935225
"d" 8 1621 202.625 .004935225
"d" 8 1621 202.625 .004935225
"d" 8 1621 202.625 .004935225
"d" 8 1621 202.625 .004935225
"d" 8 1621 202.625 .004935225
*** Summary statistics
sum x x1 if category=="a"
Variable | Obs Mean Std. dev. Min Max
-------------+---------------------------------------------------------
x | 31,970 116.7878 99.97373 5.7 458.15
x1 | 31,970 .0167 .0172016 .0021827 .1754386
. sum x x1 if category=="b"
Variable | Obs Mean Std. dev. Min Max
-------------+---------------------------------------------------------
x | 76,177 205.8899 131.6166 .25 608
x1 | 76,177 .021 .2244434 .0016447 4
. sum x x1 if category=="c"
Variable | Obs Mean Std. dev. Min Max
-------------+---------------------------------------------------------
x | 34,355 76.30404 50.26179 7.5 616.3333
x1 | 34,355 .0196287 .0149936 .0016225 .1333333
. sum x x1 if category=="d"
Variable | Obs Mean Std. dev. Min Max
-------------+---------------------------------------------------------
x | 5,403 380.9771 195.2229 71.5 800.2
x1 | 5,403 .0042572 .003721 .0012497 .013986
. sum x x1 if category =="e"
Variable | Obs Mean Std. dev. Min Max
-------------+---------------------------------------------------------
x | 31,906 255.0561 194.5661 20 1272
x1 | 31,906 .0071702 .0081141 .0007862 .05
.
*********
In this case, the mean of x for category a is 116.7878 and the mean of x for category b is 205.8899. However, the mean of the reciprocal of x , which is x1, is lower for a than b. Why is this the case? Thank you.

Comment