Coder Social home page Coder Social logo

dsc-1-09-20-one-sample-z-test-lab-data-science-demo's Introduction

One-sample z-test - Lab

Introduction

In this lab we will go through quick tests to help you better understand the ideas around hypothesis testing.

Objectives

You would be able to

  • Understand and explain use cases for a 1-sample z-test
  • Set up null and alternative hypotheses
  • Calculate z statistic using z-tables and cdf functions
  • Calculate and interpret p-value for significance of results.

Exercise 1

A rental car company claims the mean time to rent a car on their website is 60 seconds with a standard deviation of 30 seconds. A random sample of 36 customers attempted to rent a car on the website. The mean time to rent was 75 seconds. Is this enough evidence to contradict the company's claim?

Follow the 5 steps shown in previous lesson and use alpha = 0.05.

# State you null and alternative hypotheses
# Your solution here


# (p = 0.0013498980316301035, z = 3.0)
# Interpret the results in terms of p-value obtained

Exercise 2

Twenty five students complete a preparation program for taking the SAT test. Here are the SAT scores from the 25 students who completed program:

434 694 457 534 720 400 484 478 610 641 425 636 454 514 563 370 499 640 501 625 612 471 598 509 531

We know that the population average for SAT scores is 500 with a standard deviation of 100.

The question is, are these students’ SAT scores significantly greater than a population mean?

Note that the the maker of the SAT prep program claims that it will increase (and not decrease) your SAT score. So, you would be justified in conducting a one-directional test. (alpha = .05).

# State your hypotheses 
# Give your solution here 



# p = 0.03593031911292577, z = 1.8
# Interpret the results in terms of p-value obtained

Summary

In this lesson, we conducted a couple of simple tests comparing sample and population means, in an attempt to reject our null hypotheses. This provides you with a strong foundation to move ahead with more advanced tests and approaches in statistics.

dsc-1-09-20-one-sample-z-test-lab-data-science-demo's People

Contributors

shakeelraja avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.