# tValue

David Bourne david@boomer.org
Find my other Apps, eBooks and an AppleTV app at https://www.pharmpk.com/MyeBooks.html
4 Nov 2018 v1.4 Submitted for approval. Approved, 5 Nov 18 and available.

.

Updated for iOS 12 and iPhones Xr, Xs, Xs Max. Added privacy policy link

14 July 2018 v1.3 Submitted for approval. Approved, 17 Jul 18
• GUI Re-arranged with a Stack View
• Localization for France, Spain, Germany, Japan, China (Simplified), Korea, Thailand

22 Oct 2017 v1.2 Approved and available

• Added t-test for significance of mean from zero or some other specified value. One-sample t-test. This can also be used for paired t-test where the mean and standard deviations entered for the difference between the paired values.

17 Sep 2017 v1.1 Approved and available

• Updated for iOS11 and iPhone X

11 May 2016 v1.0.2 Approved and available

• Interface update

5 May 2016 v1.0.1 Approved and available

• Updated user interface with better scaling for each iPhone screen size.

10 Feb 2016 v1.0.0 Approved

## Unpaired t-test: Unequal or Equal variance and Unequal sample size

Example Data

 30.02 29.89 29.99 29.93 30.11 29.72 29.97 29.98 30.01 30.02 29.99 29.98 30 30.04 Mean 30.0162 29.92 Std Dev 0.0434042 0.1078888 n 8 6

The result using R Studio and R

Using the Welch-Satterthwaite Method

```> b1
[1] 30.02 29.99 30.11 29.97 30.01 29.99 30.00 30.04
> b2
[1] 29.89 29.93 29.72 29.98 30.02 29.98
> sd(b1)
[1] 0.04340425
> sd(b2)
[1] 0.1078888
> t.test(b1,b2)

Welch Two Sample t-test

data:  b1 and b2
t = 2.0636, df = 6.2221, p-value = 0.08296
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-0.01689914  0.20939914
sample estimates:
mean of x mean of y
30.01625  29.92000
```

Using a Pooled mathod

``` > t.test(b1,b2,var.equal = TRUE)

Two Sample t-test

data:  b1 and b2
t = 2.3107, df = 12, p-value = 0.03943
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
0.005492236 0.187007764
sample estimates:
mean of x mean of y
30.01625  29.92000
```

## One Sample t-test or Paired t-test

tValue can also be used to calculate a t value when only set of data is being compared with zero or another specified value. This method can also be used for a paired t-test once the difference between paired values is calculated.

Example Data

 0.213 0.134 0.043 1.34 Mean 0.4325 Std Dev 0.609 n 4

Leave the second set of values empty.

The result using R Studio and R

```> a2 <- c(0.213,0.134,0.043,1.34)
> sd(a2)
[1] 0.6089743
> t.test(a2)

One Sample t-test

data:  a2
t = 1.4204, df = 3, p-value = 0.2506
alternative hypothesis: true mean is not equal to 0
95 percent confidence interval:
-0.536514  1.401514
sample estimates:
mean of x
0.4325
```

And data for a paired t-test

```> b1
[1] 30.02 29.99 30.11 29.97 30.01 29.99 30.00 30.04
> b2
[1] 29.89 29.93 29.72 29.98 30.02 29.98 29.97 30.01
> c1 <- b1-b2
> c1
[1]  0.13  0.06  0.39 -0.01 -0.01  0.01  0.03  0.03
> sd(c1)
[1] 0.1336774
> t.test(b1,b2,var.equal = TRUE,paired = TRUE)

Paired t-test

data:  b1 and b2
t = 1.6662, df = 7, p-value = 0.1396
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-0.03300709  0.19050709
sample estimates:
mean of the differences
0.07875
```
One sample t-test
Paired t-test

References

## Localization

Please let me know if I've made a mistake with these translation or if additional translations can be added, e.g. for Std Dev or n, P or df. Thanks, David Bourne (david@boomer.org)

### Thai

David Bourne (david@boomer.org)