# r33 Xu-Ma re-analysis (own code)
## Check of the table's own arithmetic: y = (t_high - t_low)/(1+z), and K1 recomputed from z, E_obs (H0 = 67.3, Om = 0.315)
label | y printed | y recomputed | K1 printed | K1 recomputed (1e18 s GeV) | ratio
080916C(1)   |   1.974 |   1.974 |  4.46 |  4.46 | 1.000
080916C(2)   |   6.453 |   6.453 |  9.86 |  9.86 | 1.000
090510       |   0.452 |   0.452 |  7.21 |  7.21 | 1.000
090902B_a    |  25.506 |  25.506 | 12.90 | 12.88 | 0.998
090902B_b    |   0.674 |   0.674 |  3.84 |  3.84 | 1.000
090902B_c    |   1.559 |   1.558 |  4.58 |  4.58 | 1.001
090902Bs_a   |   5.812 |   5.811 |  5.84 |  5.84 | 1.000
090902Bs_b   |  11.554 |  11.554 |  4.10 |  4.10 | 1.000
090902Bs_c   |  12.700 |  12.700 |  4.97 |  4.97 | 1.000
090926A      |   6.603 |   6.603 |  6.53 |  6.53 | 1.000
100414A      |  13.968 |  13.968 |  8.70 |  8.70 | 1.000
130427A      |  13.509 |  13.508 |  9.02 |  9.02 | 1.000
140619B      |   0.141 |   0.141 |  7.96 |  7.94 | 0.998
K1 stated errors / K1: 0.101, 0.100, 0.101, 0.101, 0.102, 0.103, 0.101, 0.102, 0.103, 0.101, 0.101, 0.101, 0.103  (all 10 %: the LAT energy resolution)

## C1: OLS, all 13 (y on K; y in s, K in 1e18 s GeV; slope in 1e-18 GeV^-1)
slope 1.70 +- 0.66  (2.6 sigma from zero); intercept -3.99 +- 4.85; rms residual 5.64 s

## Mainline (the 8 points nearest the published line y = 2.78 K - 10.7):
  080916C(1)   resid   +0.28 s MAIN
  080916C(2)   resid  -10.26 s off
  090510       resid   -8.89 s off
  090902B_a    resid   +0.34 s MAIN
  090902B_b    resid   +0.70 s MAIN
  090902B_c    resid   -0.47 s MAIN
  090902Bs_a   resid   +0.28 s MAIN
  090902Bs_b   resid  +10.86 s off
  090902Bs_c   resid   +9.58 s off
  090926A      resid   -0.85 s MAIN
  100414A      resid   +0.48 s MAIN
  130427A      resid   -0.87 s MAIN
  140619B      resid  -11.29 s off
C2: OLS on those 8: slope 2.771 +- 0.083; intercept -10.65 +- 0.62; rms residual 0.579 s; max |resid| 0.840 s
   chi2 of the 8 about their own line using the stated 10 % K errors propagated (sigma_y = slope * sigma_K): 0.99 for 6 dof; expected ~6. Mean sigma_y = 1.96 s vs rms residual 0.58 s
   P(chi2 <= 0.99 | dof = 6) = 0.0140
   effective-variance fit of the 8 with the stated errors: slope 2.685 +- 0.283 (formal, from the stated errors alone), intercept -10.09

## C3-type look-elsewhere test (own design)
Tolerance = largest |residual| of the 8 from THEIR OWN best line = 0.840 s (the published line gives 0.867 s)
Real data: largest number of the 13 within +-0.840 s of a positive-slope line through two of them = 7
Null 'permute y among K': P(>=8 on a line) = 0.0002; P(>=7) = 0.0015; P(>=6) = 0.0186; mean max = 3.95; distribution: 3:0.273, 4:0.525, 5:0.183, 6:0.017, 7:0.001, 8:0.000, 9:0.000, 10:0.000
Null 'y uniform on [min,max] of observed y': P(>=8 on a line) = 0.0001; P(>=7) = 0.0020; P(>=6) = 0.0189; mean max = 3.81; distribution: 3:0.358, 4:0.488, 5:0.133, 6:0.017, 7:0.002, 8:0.000, 9:0.000, 10:0.000
Null 'y uniform, K uniform on observed ranges': P(>=8 on a line) = 0.0002; P(>=7) = 0.0016; P(>=6) = 0.0215; mean max = 3.80; distribution: 3:0.364, 4:0.481, 5:0.130, 6:0.020, 7:0.001, 8:0.000, 9:0.000, 10:0.000
Null 'permute', any sign of slope: P(>=8) = 0.0004; P(>=7) = 0.0023
Note: 6 of the 13 points come from one burst (090902B) with one t_low; 2 more share 080916C. The permutation null treats all 13 as exchangeable, which overstates the independence of the real data in both directions.

## C4/C5: the Xu-Ma slope as a prediction, against the nulls
E_LV = 3.597e+17 GeV
  GRB 221009A (z=0.151), E = 200 GeV: K1 = 1.245e+19 s GeV; Xu-Ma delay vs ~0 GeV = 39.9 s; LHAASO allows (E_QG,1 > 1.0e20) < 0.143 s; ratio 278
  GRB 221009A (z=0.151), E = 1000 GeV: K1 = 6.227e+19 s GeV; Xu-Ma delay vs ~0 GeV = 199.3 s; LHAASO allows (E_QG,1 > 1.0e20) < 0.717 s; ratio 278
  GRB 221009A (z=0.151), E = 7000 GeV: K1 = 4.359e+20 s GeV; Xu-Ma delay vs ~0 GeV = 1394.8 s; LHAASO allows (E_QG,1 > 1.0e20) < 5.017 s; ratio 278
  GRB 090510 (z=0.900, 28 GeV): K1 = 6.739e+18; Xu-Ma delay = 35.6 s; Abdo (a) 0.859 s -> ratio 41; (d) 0.099 s -> 360; (e) 0.010 s -> 3560
  Xu-Ma's escape: the 'lower line' intercept -20.77 s (source frame) = 39.5 s observer frame before the first low-energy peak of a short burst (<2 s long)
  HESS 2011 PKS 2155-304: M_QG,1 > 2.1e18 GeV; Xu-Ma E_LV = 3.60e+17 is 5.8 times below it
  Abdo 2009 (a): M_QG,1 > 1.19 M_Pl = 1.45e+19 GeV; ratio to Xu-Ma 40; (e): > 102 M_Pl, ratio 3459
  MAGIC: tau = 0.03 +- 0.012 s/GeV -> 1/M_QG1 = 2.08e-18 +- 8.30e-19 GeV^-1 (their 1.445e16 s); own conversion with H0 = 67.3: 1/E_LV = tau/K1(z,1GeV)(1+z) = 1.91e-18 GeV^-1
  Xu-Ma 2.78 +- 0.20 vs MAGIC 2.08 +- 0.83 (x1e-18): difference 0.8 sigma -> consistent with each other; both lie above HESS's and LHAASO's limits (under those papers' assumptions of no intrinsic lag)
