In: Statistics and Probability
Google the first 50 numbers of the Fibonacci sequence (starting with 1) to answer the following questions:
(a) Test to see if the leading digits conform to Benford’s law. Do this both graphically and analytically.
(b) Using the first 10 odd numbers in the sequence as sample 1 and the first 10 even numbers in the sequence as sample 2, use Wilcoxon’s Rank-Sum to test the claim that the numbers come from different populations.
(c) Repeat (b) using a t - Test.
Fibonacci sequence is a sequence of numbers in which each m]number (Fibonacci number) is the sum of the two preceding numbers.
First 25 numbers of the Fibonacci sequence are:
1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,1094617711,28657,46368,75025.
r-code for creating Fibonacci series is given by,
x=c(1,1) ## Required series
length(x)=50 ##Required length
for(i in 3:50)
{
x[i]=x[i-1]+x[i-2]
}
x
b)
Here our hypothesis is
H0: Numbers comes from the same population Vs
H1: Numbers comes from different population.
r-code and output:
> sam1=c(1,1,3,5,13,21,55,89,233,377)
> sam2=c(2,8,34,144,610,2584,10946,46368,196418,832040)
> wilcox.test(sam1,sam2)
Wilcoxon rank sum test with continuity correction
data: sam1 and sam2
W = 20, p-value = 0.02569
alternative hypothesis: true location shift is not equal to 0
Here p-value is 0.0256 which is less that 0.05.(at 5% L.O.S.). Hence we reject H0.Which implies that numbers comes from the different population.
c)
r-code and output:
> t.test(sam1,sam2)
Welch Two Sample t-test
data: sam1 and sam2
t = -1.3171, df = 9, p-value = 0.2203
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-295761.81 78090.61
sample estimates:
mean of x mean of y
79.8 108915.4
By using t-test, p-value is 0.22 which is geater that 0.05. Hence at 5% level of significance, we accept H0. Which means numbers come from the same population.