Self-study. Hypothesis testing and confidence interval Given following porblem.

I have to ask this question because there is no detailed solution (only yes/no).
So my approach.
From given CI I can create following system of equations: $\begin{cases} \bar{X_n} - q_{\frac{\alpha}{2}} \sigma = -2 \\ \bar{X_n} + q_{\frac{\alpha}{2}} \sigma = 3 \end{cases}$,
$q_{\frac{\alpha}{2}} = 2.576$. Solving this system gives us $\bar{X_n} \approx .5$ and $\sigma \approx 0.97$
Next step is to find RR for $H_0$ which is RR={$|\bar{X_n}| > c$}, so $P(|\bar{X_n}| > c) = 0.01$, then I have (1) $P(\bar{X_n} < -c)=(P(Z< \frac{3-c}{\sigma}) = 0.005$ and (2)$P(\bar{X_n} > c)=P(Z > \frac{c+3}{\sigma}) = 0.005$
Then from (1) equation I got $c \approx -2.5$ and so $\bar{X_n} < 2.5$, from (2) $c\approx -0.5$ and so $\bar{X_n} > -.5$. So RR={$-.5 \leq \bar{X_n} \leq 2.5$}, given fact that $\bar{X_n} \approx .5$ belongs to RR $H_0$ should be rejected.
Does it make sense, is my solution valid?
Thanks in advance.
 A: Generally, two methods can be used to explore the connection between
a t confidence interval and a t test.
Method 1: Confidence interval defined in terms of testing.
For normal data, a 99% t confidence interval (CI) can be defined
as an interval of values $\mu_0$ which would not be rejected in a
test of $H_0: \mu = \mu_0$ against $H_0: \mu \ne \mu_0.$
For your specific example, $\mu_0 = -3$ is not contained in the CI, so
when you test $H_0: \mu = -3$ against $H_0: \mu \ne -3,$ you will reject $H_0.$
Method 2: Deduce $\bar X$ and $S$ from the confidence interval and use the results to do a t test. This method works, provided that you know it's a t confidence interval and you know $n$ and the confidence level.
A 99% CI for normal mean $\mu$ is of the form $\bar X \pm t^*S/\sqrt{n},$
where $t^*$ cuts probability $0.005$ from the upper tail of Student's t distribution with $n-1$ degrees of freedom.
So you know $\bar X$ is as the center of the CI $(-2,3),$ which is $\bar X = (-2+3)/2 = 0.5.$
If $n = 20,$ then DF $= 19$ and $t^*= 2.861$ from printed tables of t distributions or by using software such as R:
qt(.995, 19)
[1] 2.860935

Then, half of the length $5$ of the CI (sometimes called the margin of error) is $2.5 = 2.861\,S/\sqrt{20},$
which you could solve to find the sample standard deviation $S.$
Finally, knowing $\bar X, S,$ and $n$ you could find the t statistic
$T = \frac{\bar X - \mu_0}{S/\sqrt{n}},$ and compare it with the critical values $\pm c = \pm 2.861$ to decide whether to reject $H_0.$
In this case, we don't know $n.$ I used $n = 20$ just to show an example where $n$ is known. In your case, only Method 1 is available.
Note: Suppose you had $n = 20$ observations as shown below, randomly sampled from a normal distribution with $\mu = -0.5, \sigma = 2.$
Then the procedure t.test in R can be used to test $H_0: \mu=-3$ against $H_a: \mu \ne -3$ at the 1% level and to give a 99% confidence interval for $\mu.$
In this particular case, the 99% CI is $(-2.53,  1.12),$ which does not contain $\mu_0 = -3,$ and a test of $H_0: \mu = -3$ against $H_a: \mu \ne -3$ has P-value $0.002 < 1\%,$ and so is rejected at the 1% level of significance.
set.seed(2020)
x = rnorm(20, -.5, 2)
summary(x)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
-6.5775 -2.3287 -0.3243 -0.7047  1.3334  3.1001 
sd(x)
[1] 2.852494
t.test(x, mu=-3, conf.lev=.99)

    One Sample t-test

data:  x
t = 3.5985, df = 19, p-value = 0.001915
alternative hypothesis: true mean is not equal to -3
99 percent confidence interval:
 -2.529546  1.120074
sample estimates:
mean of x 
-0.704736 

