NEFSC / READ-SSB-CHAJI-Effort-Displacement---Scallop

Other
0 stars 0 forks source link

z to t. #258

Closed mle2718 closed 4 months ago

mle2718 commented 4 months ago

a couple tests show statistically significant differences even though the actual differences are not economically meaningful. For example, this is the test for landed pounds, for the NYB GC 12 vs 2.

t.test(dropped_values_NY_1_2_GC$LANDED_win,y=Inside_NY2_GC$LANDED_win, alternative=c("two.sided"), paired=FALSE, var.equal=FALSE, conf.level=0.99)
## 
##  Welch Two Sample t-test
## 
## data:  dropped_values_NY_1_2_GC$LANDED_win and Inside_NY2_GC$LANDED_win
## t = -8.6119, df = 15059, p-value < 0.00000000000000022
## alternative hypothesis: true difference in means is not equal to 0
## 99 percent confidence interval:
##  -20.97643 -11.31640
## sample estimates:
## mean of x mean of y 
##  448.1387  464.2851

in stata:


. ttest landed_win , by(type) unequal level(99)

Two-sample t test with unequal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [99% conf. interval]
---------+--------------------------------------------------------------------
       2 |   7,223    464.2851    1.493677     126.945    460.4367    468.1336
      12 |  12,558    448.1387    1.133201    126.9894    445.2193    451.0581
---------+--------------------------------------------------------------------
Combined |  19,781    454.0346      .90446    127.2077    451.7046    456.3645
---------+--------------------------------------------------------------------
    diff |            16.14641    1.874891                 11.3164    20.97643
------------------------------------------------------------------------------
    diff = mean(2) - mean(12)                                     t =   8.6119
H0: diff = 0                     Satterthwaite's degrees of freedom =  15058.9

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 1.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 0.0000
  1. The answers match, which is always good.
  2. The difference is 16 lbs. While they are statistically different, it's not economically a big deal. This is one of those times where a large enough sample size will often (always) find a statistical difference.