R ile A/B Testi
Lauryn Burleigh
Data Scientist

Spearman korelasyonu (rho): monoton ilişki
Monoton, doğrusaldan daha esnektir
ggplot(data, aes(x = drownings,
y = icecream)) +
geom_point()


library(pwr)
pwr.r.test(r = 0.3, power = 0.80,
sig.level = 0.05)
yaklaşık korelasyon gücü
hesaplaması (arctangh dönüşümü)
n = 84.07364
r = 0.3
sig.level = 0.05
power = 0.8
alternative = two.sided
cor.test(~ enjoyment + time,
data = pizza,
method = "spearman",
exact = FALSE)
Spearman'ın sıra korelasyonu rho
everi: time ve enjoyment
S = 2, p-değeri = .003245
alternatif hipotez: gerçek rho 0'a
eşit değildir
örnek tahminleri:
rho
0.9984962
samp <- length(pizza$time)
[1] 90
cor.test(~ enjoyment + time,
data = pizza,
subset =
(Topping == "Cheese"),
method = "spearman",
exact = FALSE)
Spearman'ın sıra korelasyonu rho
everi: time ve enjoyment
S = 1.2434e-14, p-değeri = 0.0003968
alternatif hipotez: gerçek rho 0'a
eşit değildir
örnek tahminleri:
rho
1
ggplot(pizza, aes(x = enjoyment,
y = time,
color = Topping)) +
geom_point()

library(pwr)
pwr.r.test(r = 0.998, n = 90,
sig.level = 0.003)
yaklaşık korelasyon gücü
hesaplaması (arctangh dönüşümü)
n = 90
r = 0.998
sig.level = 0.003
power = 1
alternative = two.sided
rhotest <- cor.test(~ enjoyment + time,
data = pizza,
method = "spearman")
samp <- length(pizza$time)
library(pwr)
pwr.r.test(r = rhotest$estimate,
sig.level = rhotest$p.value,
n = samp)
yaklaşık korelasyon gücü
hesaplaması (arctangh dönüşümü)
n = 90
r = 0.998
sig.level = 0.003
power = 1
alternative = two.sided
R ile A/B Testi