Repository: scipy/scipy
Pull request: DOC: Documentation note update for truncnorm

<!-- 
Thanks for contributing a pull request! Please ensure that
your PR satisfies the checklist before submitting:
http://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-submitting-a-pr

Also, please name and describe your PR as you would write a
commit message:
http://scipy.github.io/devdocs/dev/contributor/development_workflow.html#writing-the-commit-message

Note that we are a team of volunteers; we appreciate your
patience during the review process.

Again, thanks for contributing!
-->

#### Reference issue
 Closes #16914

#### What does this implement/fix?
The documentation note for the truncnorm distribution is more clear.


Problem statement:
BUG: documentation of scipy.stats.truncnorm could be clearer
### Describe your issue.

In the notes of the distribution, it states:

> The standard form of this distribution is a standard normal truncated to the range [a, b], where a and b are user-provided shape parameters. The parameter loc shifts the mean of the underlying normal distribution, and scale controls the standard deviation of the underlying normal, but a and b are still defined with respect to the standard normal. If myclip_a and myclip_b are clip values defined with respect to a shifted and scaled normal, they can be converted the required form according to:

I think the phrasing 'underlying normal' (particularly with respect to the standard deviation) may be confusing for some because it implies that the parameter has no impact on the truncation of the normal - that is, it happens "before the normal distribution is truncated". However, the scale parameter does effect where the truncation limits are - that is, changing the parameter from 1 to 2 will double the width of the truncated normal. For the same reason, how to define a and b seems a little unclear. 

I'd like to suggest this alternative phrasing, as a drop-in replacement for the above:

> This distribution is the normal distribution centred on loc, with standard deviation scale, and clipped at a, b standard deviations to the left, right (respectively) from loc, with the height calculated such that probability summed over the sample space is 1. Note that the standard deviation of the standard normal distribution is 1.0, the default. If myclip_a and myclip_b are clip values in the sample space (as opposed to the number of standard deviations) then they can be converted to the required form according to:

### Reproducing Code Example

```python
import scipy.stats
import numpy as np
import matplotlib.pyplot as put

x = np.linspace(-5, 5, num=201)

tn = scipy.stats.truncnorm.pdf(x, -2, 2)
plt.plot(x, tn)

tn2 = scipy.stats.truncnorm.pdf(x, -2, 2, scale=2)
plt.plot(x, tn2)

tn3 = scipy.stats.truncnorm.pdf(x, -1, 1, scale=2)
plt.plot(x, tn3)
```


### Error message

```shell
N/A
```


### SciPy/NumPy/Python version information

1.5.1 1.18.5 sys.version_info(major=3, minor=7, micro=7, releaselevel='final', serial=0)

Hints from issue discussion:
We did some work on that message, but I agree - we still didn't get it right. 

I think your phrasing is great - I really like that it's put in terms of standard deviations, since I think is something newcomers will understand better than "scale". I'd just trim some of the parts I think can be left unstated. 

> This distribution is the normal distribution centered on `loc` (default 0), with standard deviation `scale` (default 1), and clipped at `a`, `b` standard deviations to the left, right (respectively) from `loc`. ~~with the height calculated such that probability summed over the sample space is 1. Note that the standard deviation of the standard normal distribution is 1.0, the default.~~ If `myclip_a` and `myclip_b` are clip values in the sample space (as opposed to the number of standard deviations) then they can be converted to the required form according to:

I think the bit about height/probability is to be assumed. The same can be said of any probability distribution. 

Also, the default values of `loc` and `scale` do appear at the bottom of the page in the method definitions. If we're going to include them up here, I think that it makes to include both (rather than just `scale`). For concision, I'd suggest doing it in the first sentence, where the quantities are first mentioned.

Would you like to submit a PR?

---

Just thought I'd include the plots suggested above for reviewer convenience:
```python3
import scipy.stats
import numpy as np
import matplotlib.pyplot as plt

x = np.linspace(-5, 5, num=201)

tn = scipy.stats.truncnorm.pdf(x, -1, 1)
plt.plot(x, tn)
```
![image](https://user-images.githubusercontent.com/6570539/187096388-92e357f7-1699-427e-88d2-95e3b28c9d21.png)

```python3
tn2 = scipy.stats.truncnorm.pdf(x, -1, 1, scale=2)
plt.plot(x, tn2)
```
![image](https://user-images.githubusercontent.com/6570539/187096406-ae5407de-924d-42af-90a5-de7f08af8245.png)

```python3
tn3 = scipy.stats.truncnorm.pdf(x, -1, 1, loc=2, scale=2)
plt.plot(x, tn3)
```
![image](https://user-images.githubusercontent.com/6570539/187096410-37df4a76-bbd1-4b1a-acfb-e539e2241f86.png)


Yes, will do.

Commit message: Cleaned up spacing.

Patch to review:
diff --git a/scipy/stats/_continuous_distns.py b/scipy/stats/_continuous_distns.py
index 65f2bba06376..d0222cb2407d 100644
--- a/scipy/stats/_continuous_distns.py
+++ b/scipy/stats/_continuous_distns.py
@@ -8402,14 +8402,12 @@ class truncnorm_gen(rv_continuous):
 
     Notes
     -----
-    The standard form of this distribution is a standard normal truncated to
-    the range ``[a, b]``, where ``a`` and ``b`` are user-provided shape
-    parameters. The parameter ``loc`` shifts the mean of the underlying normal
-    distribution, and ``scale`` controls the standard deviation of the
-    underlying normal, but ``a`` and ``b`` are still defined with respect to
-    the *standard* normal. If ``myclip_a`` and ``myclip_b`` are clip values
-    defined with respect to a shifted and scaled normal, they can be converted
-    the required form according to::
+    This distribution is the normal distribution centred on ``loc`` (default 
+    0), with standard deviation ``scale`` (default 1), and clipped at ``a``, 
+    ``b`` standard deviations to the left, right (respectively) from ``loc``. 
+    If ``myclip_a`` and ``myclip_b`` are clip values in the sample space (as 
+    opposed to the number of standard deviations) then they can be converted 
+    to the required form according to:
 
         a, b = (myclip_a - loc) / scale, (myclip_b - loc) / scale
 


Code review comments:
diff_hunk: @@ -8402,14 +8402,12 @@ class truncnorm_gen(rv_continuous):
 
     Notes
     -----
-    The standard form of this distribution is a standard normal truncated to
-    the range ``[a, b]``, where ``a`` and ``b`` are user-provided shape
-    parameters. The parameter ``loc`` shifts the mean of the underlying normal
-    distribution, and ``scale`` controls the standard deviation of the
-    underlying normal, but ``a`` and ``b`` are still defined with respect to
-    the *standard* normal. If ``myclip_a`` and ``myclip_b`` are clip values
-    defined with respect to a shifted and scaled normal, they can be converted
-    the required form according to::
+    This distribution is the normal distribution centred on ``loc`` (default 
+    0), with standard deviation ``scale`` (default 1), and clipped at ``a``, 
+    ``b`` standard deviations to the left, right (respectively) from ``loc``. 
+    If ``myclip_a`` and ``myclip_b`` are clip values in the sample space (as 
+    opposed to the number of standard deviations) then they can be converted 
+    to the required form according to:
path: scipy/stats/_continuous_distns.py
text: @user1:
```suggestion
    This distribution is the normal distribution centred on ``loc`` (default
    0), with standard deviation ``scale`` (default 1), and clipped at ``a``,
    ``b`` standard deviations to the left, right (respectively) from ``loc``.
    If ``myclip_a`` and ``myclip_b`` are clip values in the sample space (as
    opposed to the number of standard deviations) then they can be converted
    to the required form according to:
```
PEP8 (needed to pass lint checks)