Confidence Intervals and Hypothesis Testings for 2-Sample Data


  • Code to find Confidence Interval for the population mean from matched-pair sample data when data are given and sigma is not given.

    • Input: Sample size n; mean of difference of data d_bar; Standard deviation of difference of data s; Confidence level CL (in percentage without percentage symbol)
    • TwoD_CI_For_Mue_No_Sigma.R
  • Code to carryout Hypothesis Testing for the population mean from matched-pair sample data when data are given and population standard deviation is not given.
    • Input: Difference of the data DiffData; Alternative hypothesis H1 ('less', 'greater', or 'two.sided'); Level of significance alpha
    • TwoD_HT_Data_For_Mue_No_Sigma.R

  • Code to carryout Hypothesis Testing for the population mean from matched-pair sample data when data are not given and population standard deviation is not given.
    • Input: Sample size n; mean of difference of data d_bar; Standard deviation of difference of data s; Alternative hypothesis H1 ('less', 'greater', or 'two.sided'); Level of significance alpha
    • TwoD_HT_For_Mue_No_Sigma.R

  • Code to carryout Hypothesis Testing for the population proportion from matched-pair sample data.
    • Input: Frequency f12; Frequency f21; Alternative hypothesis H1 ('less', 'greater', or 'two.sided'); Level of significance alpha
    • TwoD_HT_For_p.R

  • Code to find Confidence Interval for the difference of means of 2 independent populations when data are given and population standard deviations are not given but assumed to be equal.

  • Code to find Confidence Interval for the difference of means of 2 independent populations when data are given and population standard deviations are not given.


  • Code to find Confidence Interval for the difference of means of 2 independent populations when data are given and population standard deviations are given.
    • Input: Sample data x1; Sample data x2; Population standard deviation sigma1; Population standard deviation sigma2; Confidence level CL (in percentage without percentage symbol)
    • TwoI_CI_Data_For_Mue_With_Sigma.R

  • Code to find Confidence Interval for the difference of means of 2 independent populations when data are not given and population standard deviations are not given but assumed to be equal.
    • Input: Sample size n1; Sample size n2; Sample mean x1_bar; Sample mean x2_bar; Sample standard deviation s1; Sample standard deviation s2; Confidence Level CL (in percentage without percentage symbol)
    • TwoI_CI_For_Mue_No_Sigma_ButEqual.R

  • Code to find Confidence Interval for the difference of means of 2 independent populations when data are not given and population standard deviations are not given.
    • Input: Sample size n1; Sample size n2; Sample mean x1_bar; Sample mean x2_bar; Sample standard deviation s1; Sample standard deviation s2; Confidence Level CL (in percentage without percentage symbol)
    • TwoI_CI_For_Mue_No_Sigma.R

  • Code to find Confidence Interval for the difference of means of 2 independent populations when data are not given and population standard deviations are given.
    • Input: Sample size n1; Sample size n2; Sample mean x1_bar; Sample mean x2_bar; Population standard deviation sigma1; Population standard deviation sigma2; Confidence Level CL (in percentage without percentage symbol)
    • TwoI_CI_For_Mue_With_Sigma.R

  • Code to find Confidence Interval for difference of proportions of 2 independent populations.
    • Input: Number of subjects from population 1 fall in category of interest x1; Sample size n1; Number of subjects from population 2 fall in category of interest x2; Sample size n2; Confidence level CL (in percentage without percentage symbol)
    • TwoI_CI_For_p.R

  • Code to carryout Hypothesis Testing for difference of means of 2 independent populations when data are given and population standard deviations are not given but assumed to be equal.

  • Code to carryout Hypothesis Testing for difference of means of 2 independent populations when data are given and population standard deviations are not given.

  • Code to carryout Hypothesis Testing for difference of means of 2 independent populations when data are given and population standard deviations are given.
    • Input:Sample data x1; Sample data x2; Population standard deviation sigma1; Population standard deviation sigma2; Alternative hypothesis H1 ('less', 'greater', or 'two.sided'); Level of significance alpha
    • TwoI_HT_Data_For_Mue_With_Sigma.R

  • Code to carryout Hypothesis Testing for difference of means of 2 independent populations when data are not given and population standard deviations are not given but assumed to be equal.
    • Input: Sample size n1; Sample size n2; Sample mean x1_bar; Sample mean x2_bar; Population standard deviation sigma1; Population standard deviation sigma2; Alternative Hypothesis H1 ('less', 'greater', or 'two.sided'); Level of significance alpha
    • TwoI_HT_For_Mue_No_Sigma_ButEqual.R

  • Code to carryout Hypothesis Testing for difference of means of 2 independent populations when data are not given and population standard deviations are not given.
    • Input: Sample size n1; Sample size n2; Sample mean x1_bar; Sample mean x2_bar; Sample standard deviation s1; Sample standard deviation s2; Alternative Hypothesis H1 ('less', 'greater', or 'two.sided'); Level of significance alpha
    • TwoI_HT_For_Mue_No_Sigma.R

  • Code to carryout Hypothesis Testing for difference of means of 2 independent populations when data are not given and population standard deviations are not given.
    • Input: Sample size n1; Sample size n2; Sample mean x1_bar; Sample mean x2_bar; Population standard deviation sigma1; Population standard deviation sigma2; Alternative Hypothesis H1 ('less', 'greater', or 'two.sided'); Level of significance alpha
    • TwoI_HT_For_Mue_With_Sigma.R

  • Code to carryout Hypothesis Testing for difference of proportions of 2 independent populations.
    • Input: Number of subjects from population 1 fall in category of interest x1; Sample size n1; Number of subjects from population 2 fall in category of interest x2; Sample size n2; Alternative Hypothesis H1 ('less', 'greater', or 'two.sided'); Level of significance alpha
    • TwoI_HT_For_p.R