Tutorial: First descriptive statistics

Keywords

JASP tutorial, PocketStat, descriptive statistics walkthrough, frequency table, variable audit, business statistics tutorial

Tutorial First descriptive statistics in JASP or PocketStat 2 hours · 5 activities

Acquisition

1 Tutorial briefing

⏱ 10 min

Review the weekly task, open the teaching dataset, and check the output style expected in this module.

Investigation

2 Variable audit

⏱ 35 min

Classify selected variables as nominal, ordinal or scale, and explain why that choice matters.

Production

3 Tables and summaries

⏱ 40 min

Build frequency tables and descriptive statistics for selected variables from the teaching dataset.

Production

4 Manager summary

⏱ 25 min

Write a short paragraph that turns the output into clear management language.

Assessment

5 Share and upload

⏱ 10 min

Compare your paragraph with a classmate, improve it, and upload the final version with one cleaned output table.

Bring the chapter with you. This session runs the analysis. The explaining was done in the chapter, and this session assumes you have read it and worked the Try It exercises.

TipTwo routes, one set of steps

Every step below carries a JASP tab and a PocketStat tab. Pick the tool you are using and stay on that tab. The step numbers, the outputs, and the answers are the same either way.

JASP is installed in the lab. PocketStat runs in a browser tab with nothing to install, and the chapter page has it embedded if you would rather work there.

Activity 1: Tutorial briefing (10 minutes)

You will work with six of the 26 variables in the teaching dataset: Gender, Region, Ticket_Type, Age, Satisfaction and Waiting_Time_Mins.

Before anything else, confirm the software has read each one as the right type. This is the step most often skipped and the one that causes most of the errors in the rest of the session.

Step 1. Open the software

Launch JASP. It opens on an empty data view with the analysis ribbon along the top.

An empty JASP window. The analysis ribbon runs along the top and the data area below it is blank.

The JASP window as it opens, before any data is loaded

Open PocketStat at https://mohammedalisharafuddin.github.io/pocketstat/. The first load pulls about 73 MB, so give it up to a minute on lab wifi. It opens on the Data tab, and the four buttons along the bottom are the whole app: Data, Analyse, Results, Learn.

The PocketStat window. The title bar reads PocketStat, Statistics in your browser, and four buttons run along the bottom: Data, Analyse, Results and Learn.

PocketStat as it opens, on the Data tab

Step 2. Load the teaching dataset

Click the file menu at the top left, then Open, Computer, Browse, and choose DMM_Teaching_Data_Full.csv.

The JASP file menu open at Open, Computer, Browse, with the file dialogue showing DMM_Teaching_Data_Full.csv.

Opening the teaching dataset from the file menu

On the Data tab, open the upload card and choose DMM_Teaching_Data_Full.csv. The file is read in your browser and stays on your machine.

The PocketStat Data tab with the upload card open and DMM_Teaching_Data_Full.csv chosen.

Uploading the teaching dataset on the Data tab

Step 3. Check the whole dataset arrived

The data view fills. Scroll to the bottom and confirm the last row is 200, then scroll right and confirm there are 26 columns. A short file usually means the wrong delimiter.

The JASP data view filled with the teaching dataset. Row numbers run down the left to 200 and the column headers name the 26 variables.

The dataset loaded, 200 rows and 26 columns

The data summary card reports the number of rows and columns. Confirm it says 200 rows and 26 columns before going further.

The PocketStat Data tab showing the data summary card, which reports 200 rows and 26 columns, above the data grid.

The dataset loaded, 200 rows and 26 columns

Step 4. Find where the variable type is shown

Each column header carries a small icon for its measurement level: a ruler for scale, three ascending bars for ordinal, and three circles for nominal. JASP guesses this from the column contents, and it guesses wrong often enough to be worth checking every time.

Close view of three JASP column headers. Each carries a small icon: a ruler for scale, three bars for ordinal, and three circles for nominal.

The measurement-level icon in each column header

The variables card lists every variable with the type PocketStat has detected. Read it top to bottom once. The detection is a guess from the column contents, so treat it as a draft.

The PocketStat variables card. Each of the 26 variables is listed with the type PocketStat has detected for it.

The variables card listing each variable and its detected type

Step 5. Change a type when the guess is wrong

Click the icon in the column header. The three measurement levels appear and you pick the right one. The change applies to every analysis that uses the column from then on.

A JASP column header clicked open, showing the three measurement levels with one being selected.

Changing a variable’s measurement level

Open the cleaning card, pick the variable, and set its type there. Any analysis you run afterwards uses the new type.

The PocketStat cleaning card with a variable selected and its type being changed.

Changing a variable’s type in the cleaning card

Activity 2: Variable audit (35 minutes)

Working in pairs, complete an audit of the six variables.

Step 6. Read the six variables and their current types

Scroll the data view until Gender, Region, Ticket_Type, Age, Satisfaction and Waiting_Time_Mins are visible together, and note the icon on each.

The JASP data view scrolled to show Gender, Region, Ticket_Type, Age, Satisfaction and Waiting_Time_Mins side by side with their type icons visible.

The six audit variables and their current types

Scroll the variables card to the same six and note the type beside each.

The PocketStat variables card scrolled to Gender, Region, Ticket_Type, Age, Satisfaction and Waiting_Time_Mins, each with its detected type.

The six audit variables and their current types

For each one, record the measurement scale, whether it is discrete or continuous where that applies, the summaries that are legitimate for it, and one summary that would be wrong.

Table 1.20: Variable audit: complete one row for each variable
Variable Scale Discrete or continuous Legitimate summaries A wrong summary
Gender not applicable
Region not applicable
Ticket_Type not applicable
Age
Satisfaction
Waiting_Time_Mins

Two of these are arguable. Decide what you think and be ready to defend it:

  1. Satisfaction is recorded 1 to 5. Is treating it as continuous defensible? What would you have to assume, and what would you report instead if you were not willing to assume it?
  2. Age is recorded in completed years. Is it discrete or continuous? Does the answer change what you would do with it?

Keep this table. You upload it at the end of the session.

Activity 3: Tables and summaries (40 minutes)

Produce four outputs, in the order below. Steps 7 to 10 give you the first.

Output 1, a frequency table for Ticket_Type

Step 7. Open the descriptives panel

Click Descriptives on the ribbon, then Descriptive Statistics. The options panel opens on the left and the output appears on the right as you work.

The JASP ribbon with the Descriptives icon open and Descriptive Statistics highlighted in its menu.

Opening Descriptive Statistics from the ribbon

Tap Analyse on the bottom bar, then choose Descriptive statistics from the technique list.

The PocketStat Analyse tab with the technique list showing and Descriptive statistics selected.

Choosing Descriptive statistics on the Analyse tab

Step 8. Move Ticket_Type into the variables box

Select Ticket_Type in the list on the left and click the arrow to send it to Variables.

The JASP Descriptive Statistics panel. Ticket_Type has been moved from the left-hand variable list into the Variables box on the right.

Moving Ticket_Type into the Variables box

In the variable chooser, select Ticket_Type and move it into the chosen list. Categorical variables get a frequency distribution, which is the output you want here.

The PocketStat variable chooser with Ticket_Type moved from the available list into the chosen list.

Moving Ticket_Type into the chosen list

Step 9. Ask for the frequency table

Tick Frequency tables in the options panel. The output updates as soon as you tick it.

The JASP Descriptive Statistics panel with the Frequency tables checkbox ticked.

Ticking Frequency tables

Run the analysis. PocketStat checks the data requirements before it runs and tells you if the variable type does not suit the technique.

The PocketStat Analyse tab with Ticket_Type chosen and the run button about to be pressed.

Running the analysis

Step 10. Read the finished table

The table gives frequency, percent, valid percent, and cumulative percent for each ticket type. Relative frequency is the percent column expressed as a proportion.

A JASP output table headed Frequencies for Ticket_Type, with columns for frequency, percent, valid percent and cumulative percent.

The finished frequency table for Ticket_Type

Open the Results tab. The table lists each ticket type with its count and percentage.

A PocketStat results table headed Ticket_Type, listing each ticket type with its count and percentage.

The finished frequency table for Ticket_Type

Check the counts sum to 200. If they fall short, some rows are missing a value. Record this as information about the data.

Output 2, a grouped frequency table for Waiting_Time_Mins

Use intervals of ten minutes. Check your interval boundaries leave no gaps and no overlaps.

Step 11. Create the ten-minute bands

Click the + at the right-hand end of the column headers to add a computed column, name it Wait_Band, and use the R-style formula box:

cut(Waiting_Time_Mins, breaks = seq(0, 100, 10), right = FALSE)

right = FALSE makes each band include its lower boundary and exclude its upper one. This stops 30 minutes appearing in two bands at once.

JASP marks every new computed column as Scale, regardless of what it holds. Wait_Band holds ordered labels such as [20,30), not a number you can average, so change its measurement level to Ordinal before you run any analysis on it. This is the same variable audit from earlier in this chapter. There, you audited a column you imported. Here, you audit one you just created yourself.

The JASP computed column editor with a formula that cuts Waiting_Time_Mins into ten-minute bands.

Creating a computed column for the ten-minute bands

PocketStat has no banding tool, so read the bands off the picture instead. Choose Distribution shape on the Analyse tab, pick Waiting_Time_Mins, and set the histogram to ten-minute bars.

The PocketStat Distribution shape output for Waiting_Time_Mins, with the histogram bars falling into ten-minute bands.

Reading the ten-minute bands off the distribution

Step 12. Add the cumulative column

Run Descriptives on Wait_Band with Frequency tables ticked. The cumulative percent column is produced for you.

A JASP frequency table for the banded variable, with the cumulative percent column marked.

The cumulative percent column in the output

Copy the band counts into your notes and write a running total beside them. The running total is the cumulative frequency, and dividing it by 200 gives cumulative relative frequency.

A worksheet with the band counts copied from PocketStat and a running total written beside them.

Building the cumulative column by hand

Step 13. Check the finished grouped table

Read down the bands and confirm each one is ten minutes wide, that no waiting time could fall into two bands, and that the final cumulative percent is 100.

A JASP frequency table for the banded waiting time, showing each ten-minute band with its count, percent and cumulative percent.

The finished grouped frequency table

Read down the bands and confirm each one is ten minutes wide, that no waiting time could fall into two bands, and that the final cumulative total is 200.

The completed grouped table, each ten-minute band with its count, relative frequency and cumulative frequency.

The finished grouped frequency table

Output 3, descriptive statistics for the three numerical variables

Step 14. Move the three variables in

Return to Descriptive Statistics and put Age, Satisfaction and Waiting_Time_Mins into Variables. Clear Ticket_Type out first so the table stays readable.

The JASP Descriptive Statistics panel with Age, Satisfaction and Waiting_Time_Mins in the Variables box.

Moving the three numerical variables in

Return to Descriptive statistics and choose Age, Satisfaction and Waiting_Time_Mins. Clear Ticket_Type out first.

The PocketStat variable chooser with Age, Satisfaction and Waiting_Time_Mins in the chosen list.

Choosing the three numerical variables

Step 15. Ask for the six statistics

Open the Statistics section and tick mean, median, standard deviation, minimum, maximum and quartiles. Untick anything you were not asked for, because a table with 20 rows is harder to read than one with 6.

The JASP Statistics section expanded, with mean, median, standard deviation, minimum, maximum and quartiles ticked.

Ticking the statistics to report

PocketStat reports centre, spread, and quartiles together for a scale variable, so there is nothing to tick. Check the options panel to see what it will report before you run it.

The PocketStat options panel for Descriptive statistics, showing which summaries it will report.

The statistics PocketStat reports by default

Step 16. Read the output table

Variables run across the columns and statistics down the rows. Read one column at a time rather than one row, because a single variable’s centre and spread belong together.

A JASP descriptives table with Age, Satisfaction and Waiting_Time_Mins down the columns and the six statistics down the rows.

The finished descriptive statistics table

Open the Results tab. Read one variable at a time, taking its centre and its spread together.

A PocketStat results table giving centre, spread and quartiles for the three numerical variables.

The finished descriptive statistics table

Output 4, two plots

Step 17. Plot Region as a bar chart

With Region in Variables, open the Plots section and tick the bar plot. Check the vertical axis starts at zero.

The JASP Plots section with the bar plot option ticked, and the resulting bar chart of Region beside it.

A bar chart of Region

Run Descriptive statistics on Region. The frequency chart draws one bar per region. Check the vertical axis starts at zero.

The PocketStat results view showing the frequency chart for Region as bars, one per region.

A bar chart of Region

Step 18. Plot Waiting_Time_Mins as a histogram and a boxplot

With Waiting_Time_Mins in Variables, tick the distribution plot and the boxplot in the Plots section. Read them together: the histogram shows the shape and the boxplot shows the quartiles and the distant values.

The JASP Plots section with distribution plot and boxplot ticked, and both plots for Waiting_Time_Mins shown.

A histogram and boxplot of Waiting_Time_Mins

Choose Distribution shape on the Analyse tab and pick Waiting_Time_Mins. The histogram and the boxplot are drawn on the same scale, so the tail lines up across both.

The PocketStat Distribution shape output for Waiting_Time_Mins, a histogram above a boxplot on the same scale.

A histogram and boxplot of Waiting_Time_Mins

Then answer three questions from your own output:

  1. What proportion of customers waited under 40 minutes? Which column gave you that most directly?
  2. Compare the mean and median of Waiting_Time_Mins. What does the comparison say about the shape, and did the histogram agree?
  3. Is the mean of Satisfaction a defensible summary here? Say what you would report and why.

Activity 4: Manager summary (25 minutes)

Write one paragraph, no more than 120 words, answering the chapter’s decision question: is the service any good?

A strong paragraph does five things:

  1. States what was measured and on how many cases.
  2. Gives the centre and the spread, in the original units.
  3. Names the decision-relevant tail, not only the average.
  4. Says what the evidence leaves open.
  5. Ends with something a manager could do.

A weak paragraph reports the procedure, gives a mean with no spread, or quietly promotes a sample statistic to a fact about all customers.

Write it for a service manager who has not seen the data and will not read a table.

Activity 5: Share and upload (10 minutes)

Swap paragraphs with a classmate. Check theirs against the five points above and mark which are missing. Take their comments on yours, revise once, and upload.

Step 19. Take a clean copy of one output table

Right-click the table in the output pane and copy it. Paste it into your document and check the column headings survived the paste.

A JASP output table right-clicked, with the copy option highlighted in the menu.

Copying a cleaned table out of the tool

On the Results tab, use the write-up and report blocks to take a clean copy. Paste it into your document and check the column headings survived the paste.

The PocketStat results view with the write-up and report blocks open, ready to copy.

Copying a cleaned table out of the tool

Upload your variable audit table, one cleaned output table, and your final paragraph. Then take the checkpoint quiz, whose first questions ask for figures you will find in your own output.

What good looks like

Waiting time was recorded for 200 customers at one branch over one month. Half waited 46 minutes or less and the middle half fell between 38 and 53 minutes, so the service is consistent for most people. Nineteen customers, just under one in ten, waited more than an hour, and two waited over 75 minutes. Return intention is a single ordinal rating, so the median of 4 is the honest summary, and the average of 3.66 describes no customer. These figures describe this branch in this month and say nothing about other branches. The long waits are worth investigating first, because that is where a 60-minute service standard is breached.

110 words, under the 120-word limit. Each of the five requirements above has a specific sentence doing its job:

  1. “Waiting time was recorded for 200 customers at one branch over one month” states what was measured and the sample size.
  2. “Half waited 46 minutes or less and the middle half fell between 38 and 53 minutes” gives the centre and the spread, both in minutes, the same units the manager already thinks in.
  3. “Nineteen customers, just under one in ten, waited more than an hour, and two waited over 75 minutes” names the tail the average alone hides.
  4. “These figures describe this branch in this month and say nothing about other branches” states what the evidence leaves open.
  5. “The long waits are worth investigating first, because that is where a 60-minute service standard is breached” ends with something a manager could do next.

Every figure in the paragraph is the real figure from the file. You should be able to produce each one from the outputs you built in Activity 3, so check your own paragraph against your own output before you compare it with anyone else’s.