A group of researchers conduct a research about fertility among Malaysian citizens. Data obtained from the research are as followed:
A = number of siblings that a married couple has
B = number of children that a married couple has
Table 1
A
3
4
4
6
7
9
B
2
5
5
6
4
4
Determine the statistics analysis method if you want to find the relationship between A and B.
Is there exists a relationship between A and B?
Plot a scatter diagram for Table 1. Draw the regression line on the diagram.
The statistical analysis method used to determine whether a relationship exist between the independent variable and the dependent variable is correlation. Correlation involves determining the correlation coefficient which measures the strength and direction of relationship between two variables.
To determine whether a relationship exist between and , we find the value of the correlation coefficient as follows.
From the data above,
Therefore, the correlation coefficient is given as,
Therefore, a weak positive relationship exist between the number of siblings that a married couple has (A) and the number of children that a married couple has (B).
Entering the following commands in produces the scatter diagram below.
>A=c(3,4,4,6,7,9)
>B=c(2,5,5,6,4,4)
>plot(A,B, main="A scatter diagram of B against A")
To draw a regression line on the scatter diagram, we enter the following commands
>A=c(3,4,4,6,7,9)
>B=c(2,5,5,6,4,4)
>abline(lm(B~A), color="blue")
These commands draws the required regression line which is blue in color on the scatter plot.
Comments