Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 12

[Music]

hello statistics students

this is your instructor dr todd daniel

and today

i'm going to teach you how to use jasp

for hypothesis

testing using a one-sample z-test

what is a one-sample z-test

it is a parametric procedure that tests

whether a sample mean is statistically

significantly different than a

population mean

and we use it when we know the standard

deviation

of the population in this example

i have a population with a mean of one

hundred and a standard deviation of

eleven and i want to test whether my

mean of one hundred and

fifty a sample that has been drawn from

that population

is different than the mean of one

hundred

manufacturing produces ball bearings

that should have a diameter of 0.50

millimeters to maintain quality control

each hour a sample of 30 ball bearings

is randomly selected for testing to be

within specification

the bearings must deviate by no more


than

.06 millimeters on average

this measure of deviation is going to

serve as our standard deviation

and the mean will be 0.5 that is the

measurement

that the population of ball bearings

should maintain

we are going to use this setup and our

five steps of hypothesis testing

to walk through and determine what kind

of test we will use

then set up and run that test

let's see what we have we have one

sample which has been drawn from a

population

that sample has a mean and the

specifications

will serve as a mean and a standard

deviation for the population

therefore this is the perfect setup to

use

a one sample z-test

having established that let's review the

assumptions

for a one-sample z-test the independent

variable should be a single sample

and that is what we have they are ball

bearings this is a categorical variable


where the variable simply is ball

bearings

we were told in the word problem that

the ball bearings have been randomly

selected the dependent variable would be

something that we measure

in this case the diameter of the ball

bearings

we can add up divide by n and get an

average for the diameter of the ball

bearings in our

sample we should also look at our data

set to make sure we don't have any

extreme

outliers missing data we know from the

random selection that the data should be

independent and we can check for

normality with our software

the settings for a one-sample z-test

begin

with a null hypothesis that the sample

mean is the same

as the population mean the sample should

be the same as the population from which

it was drawn

we would write this in symbols using h

sub zero colon mu equals

mu sub zero where we will substitute

a number and that number will be the

actual population mean


in this case a 0.5 that leaves us with

our alternative hypothesis

that the sample mean does not equal the

population mean

and we would write that as h sub 1 colon

mu does not equal mu sub 0

where we will substitute the same number

as we did in the null hypothesis

for the population mean typically we set

our alpha level to 0.05

which for a normal distribution means

that with a two-tailed test

alpha of 0.05 our critical value will be

positive

and negative 1.96 for the upper and

lower tail

if we were doing a one-tailed test then

at a .05 our critical value would be

either

positive 1.645 or

negative 1.645 depending upon the

direction of change

that we were looking for knowing the

typical settings

let's use those for step two where we

establish

our null and alternative hypotheses

our research question asks whether the

sample ball bearings


are different from specification

for our null hypothesis we would write

this in words as

sample ball bearings are no different

than specification and in symbols that

would be

h sub 0 colon mu

equals 0.500

that is the mean of the population

for the alternative hypothesis knowing

that we are doing a two-tailed test

we would say the sample ball bearings

are

different than specification not

indicating a direction of change

and in symbols h sub 1 colon

mu equals 0.500

the same mean of the population as we

used for our null hypothesis

why are we using a two-tailed test

because changes in either direction we

want to know about

they're both bad if the bearings are too

big or

if the bearings are too small either way

they would be out of specification

changes in either direction are things

that we want to know about

that brings us to step three let's set

our criteria for significance


we are using a two-tailed test with an

alpha level of 0.05

using a normal distribution our critical

value will be

positive or negative 1.96

and now we are ready to calculate the

statistics

and for that we will go to jasp

you can see that i have my data in an

excel spreadsheet

here on the desktop let's begin by

opening that up in excel

now if you are enrolled in my statistics

class then you will be using this

first tab ball bearings for your test

this data consists of a column of data

that's our independent variable our one

sample of ball bearings

each of the data points will make up our

dependent variable

these are measures of the diameter of

the ball bearings which can be averaged

to get a sample mean now for this video

i am going to be using a different set

of data called

small bearings also measures of the

diameters of ball bearings

but the results will be different from

what you would get


using the ball bearing data set this way

you know how

to do the test and you can do it

yourself with your own data

because we're using jasp we should begin

by saving this data

out as a csv or

a comma separated values workbook i'll

save it to the desktop

it is going to save the second of the

tabs

the small bearings data as a csv

which will land right there on our

desktop

i'm going to put excel away and open up

jasp just in case you need to know i'm

using jasp

14.1 i go to open

computer desktop

and there's my ball bearings.csv dataset

click to open

here's the numbers just as i saw them

in excel to do a one sample z-test we're

actually going to go to the

t-test menu and we will use

a one-sample t-test as our option

but we're not going to actually do a

t-test we will substitute

a z-test it's important to know that

there is a
bug that is known to the developers that

if we try to use the effect

size it will ignore the test value so

we'll just

close that warning and we won't get an

effect size

but we will move our data into the

variables box

and because of jasp progressive

disclosure we're already starting to see

the output as i said we're going to do a

z-test

not a t-test so i will deselect

student's t-test to do a z-test we need

both a test value

and a standard deviation the test value

being the sample mean

of 0.500 the standard deviation you

recall

our values could deviate by no more than

.06

now we have our z test and our

probability value

but we want a little bit more than that

let's get our normality check

let's also get our location estimate

which will give us a 95

confidence interval we'll skip effect

size for now but we will get descriptive


plots

and descriptives

there's our descriptive plot i'm going

to resize that

and our descriptive statistics the

assumptions check we see

the probability is a 0.8 this is

non-significant

meaning that our data pass the

assumption check for normality

we want our assumptions checks to be

non-significant meaning that our data do

not differ

from the assumption having checked the

assumption for normality and knowing

that the data pass

i'm going to now deselect this

assumptions check

just to give myself more space well now

we're ready to

interpret these data i'm going to open

up

our results a little bit wider so i can

see them a bit more clearly

let's see how we would interpret these

data points remember our critical value

was 1.96

but our z score is a 14.9

which exceeds 1.96

suggesting that these findings are


statistically significantly different

our p-value is less than 0.05

in fact less than .001

and our confidence interval for the

sample mean

does not include the mean of the

population

which is a 0.5 our sample mean is 0.336

this is the confidence interval around

that mean

if the confidence interval

around the sample mean does not include

the population value of 0.5

then the test is statistically

significant

we get our descriptive statistics the

mean and standard deviation

of the sample right down here our sample

size

is 30. all of this we will need when we

write up our test results

these results tell us all the same thing

the test

is statistically significant our sample

is different than our population

how do we interpret these findings

our decision is to reject the null

hypothesis

the hypothesis that says the sample mean


and the population mean

are the same by rejecting the null

hypothesis

that the sample and population means are

the same

we are concluding that the sample and

population means are

different statistically significantly

different or that this sample

of ball bearings is out of control

they are systematically too small to be

within

specification let's write this up in

proper

apa style a sample of ball bearings was

collected to determine

whether the manufacturing process was in

control

based on findings from a one-sample

z-test the sample of

30 ball bearings with a mean of 0.34

was statistically significantly smaller

than the specifications for the process

with a mean of 0.5 and a standard

deviation of 0.06

the process should be stopped and the

machine recalibrated

to bring ball bearing production back

into control

current ball bearings are not suitable


for use

and that is how we do a one sample

z-test

using jasp thanks for watching and be

sure to check out the channel for

other videos on how to do various

statistical tests

using jasp spss r

or xml

you

You might also like