Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

VIETNAM NATIONAL UNIVERSITY - HCMC

Ho Chi Minh city University of Technology


----------------------------------

Probability and Statistics


Report Project 202
TOPIC 1

Class: CC01
Lecturer: Phan Thị Khánh Vân
No. Name of students ID

1. Nguyễn Thanh Hiếu 1852369

2. Nguyễn Huy Hoàng 1852382

3. Nguyễn Minh Lộc 1852554


Table of Contents
1.The Theory ...............................................................3
1.1 Statistical Hypothesis Testing ............................3
1.2 Chi-squared Test .................................................3
1.3 Anova Test ...........................................................3
2.Problem Solving .......................................................4
2.1 Question 1: ...........................................................4
2.2 Question 2: ...........................................................5
2.3 Question 3: ...........................................................7
2.4 Problem 4:............................................................9
3.References:..............................................................10

.
1.The Theory
1.1 Statistical Hypothesis Testing
Hypothesis testing is an act in statistics whereby an analyst test an
assumption regarding a population parameter. The methodology
employed by the analyst depends on the nature of the data used and
the reason for the analysis.

Hypothesis testing is used to assess the plausibility of a hypothesis by


using sample data. Such data may come from a larger population, or
from a data-generating process.

1.2 Chi-squared Test


A chi-squared test, also written as χ2 test is a statistical hypothesis
test that is valid to perform when the test statistic is chi-squared
distributed under the null hypothesis specifically Pearson’s chi-squared
test and variants thereof. Pearson's chi-squared test is used to
determine whether there is a statistically significant difference between
the expected frequencies and the observed frequencies in one or more
categories of a contingency table.

1.3 Anova Test


An Anova test is a way to find out if survey or experiment results are
significant.In other words, they help you to figure out if you need to
reject the hypothesis or accept the alternate hypothesis.
2.Problem Solving
2.1 Question 1:
Method used: Chi-squared test

The Code:

H0: There is no difference in the use of means of transport to work in


the two groups of sex
H1: There is a difference in the use of means of transport to work in the
two groups of sex
The Process:
Step1: Input

Step2: Name the columns and rounds


Step3: Create the table of result and use chi-squared test

Step4 : Conclusion
We have: p-value = 0.002189, α = 0.05
=> p-value < α => reject H0 => There is a difference in the use of
means of transport to work in the two groups of sex

2.2 Question 2:
Method used: Chi-squared test

The Code:
H0: the level of life satisfaction is equally distributed
H1: the level of life satisfaction is not equally distributed
The Process:

Step1: Input

Step2: Name the columns and rounds

Step3 : Create the table of result and use chi-squared test


Step4 : Conclusion
We have: p-value = 4.132e-13, α = 0.03

=> p-value<α => reject H0 => the level of life satisfaction is not equally
distributed

2.3 Question 3:
Solving method: ANOVA test

H0: There are no differences in the amount of newspapers sold in the 5


districts
H0: There are differences in the amount of newspapers sold in the 5
districts
H1: There are no differences in the amount of newspapers sold in days
of week
H1: There are differences in the amount of newspapers sold in days of
week
The code:

The Process:
Step1: Input data and number of columns

Step2: Create table and running ANOVA test

Step3:
- Compare p-value of var1 (days of week) with the given significant
level and giving conclusion p-value=0.0181; α=0.02
Conclusion: P-value < α => reject H1=> The amount of newspapers
sold is affected by days of week
- Compare p-value of var2 (districts) with the given significant level
and giving conclusion p-value=0.0773; α=0.02
Conclusion: P-value > α => fail to reject H0=> There are no differences
in the amount of newspapers sold in the 5 districts

2.4 Problem 4:
Solving method: ANOVA test

H0: There are no differences in rental rates in the five cities


H1: There are differences in rental rates in the five cities

The Code:

The Process:
Step 1: Input data and number of columns

Step 2: Combine the input data and count the repetition of each groups

Step 3: Create the data frame

Step 4: Using ANOVA test to achieve the p-value

Step 5: Conclusion reject or fail to reject the hypothesis α = 0.05; p-


value= 6.46𝑒 −10
Conclusion: P-value<α => reject the hypothesis => There are
differences in rental rates in the five cities

3.References:
+ https://en.wikipedia.org/wiki/Chi-squared_test?fbclid=IwAR0-
jmspdYM65IKhE1XxFPljKLRI07mLM6xu0VtNSQzyuJzk5Z4gbWiQJl8
+ https://www.investopedia.com/terms/h/hypothesistesting.asp
+ https://sphweb.bumc.bu.edu/otlt/mph-
modules/bs/bs704_hypothesistesting-anova/bs704_hypothesistesting-
anova_print.html?fbclid=IwAR0cvB2EJieNwpgKBmgVtqJxbt97FuvVXJaw
pYrwPrEpA60_XUqM37LNm0w

You might also like