100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Summary

volledige samenvatting Data Science & AI

Rating
-
Sold
4
Pages
87
Uploaded on
21-10-2022
Written in
2021/2022

volledige samenvatting Data Science & AI

Institution
Course











Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Study
Course

Document information

Uploaded on
October 21, 2022
Number of pages
87
Written in
2021/2022
Type
Summary

Subjects

Content preview

1



Samenvatting DSAI theorie
Hoofdstuk 1: Basisbegrippen, steekproefonderzoek....................................................................................2
Hoofdstuk 1: python.....................................................................................................................................4
Hoofdstuk 2: Analyse van 1 variabele...........................................................................................................8
Hoofdstuk 2: python...................................................................................................................................12
Hoofdstuk 3.1: Kansrekening, de centrale limietstelling, statistische toetsen............................................17
Hoofdstuk 3.1: python................................................................................................................................23
Hoofdstuk 3.2: Hypothesetoetsen..............................................................................................................26
Hoofdstuk 3.2: python................................................................................................................................31
Hoofdstuk 4: Analyse van 2 kwalitatieve variabelen...................................................................................34
Hoofdstuk 4: python...................................................................................................................................39
Hoofdstuk 5: Analyse van 2 variabelen: kwalitatief vs kwantitatief............................................................42
Hoofdstuk 5: python...................................................................................................................................47
Hoofdstuk 6: Analyse van 2 kwantitatieve variabelen................................................................................51
Hoofdstuk 6: python...................................................................................................................................55
Hoofdstuk 7: Tijdserie-analyse....................................................................................................................63
Hoofdstuk 7: python...................................................................................................................................67
Random.......................................................................................................................................................86

, 2



Hoofdstuk 1: Basisbegrippen,
steekproefonderzoek
The scientific method
Wat zijn de doelstellingen van de wetenschappelijke methode?
 Gebaseerd op empirische validering zijn we geïnteresseerd in:
o Exploration
o Description
o Prediction
o Verification

The Research Process – stappen
1) Probleemstelling: wat is de onderzoeksvraag?
2) Exacte informatiebehoefte: wat moet er juist gemeten worden?
3) Research: doe onderzoek adhv simulaties, expirimenten, enquêtes, …
4) Data verwerken
5) Data analyseren
6) Conclusies

Basic concepts in Research
Variables & values
 Variable: algemene eigenschap v/h object
 Value: specifieke eigenschap v/h object

Meetniveaus / types variabelen (van elk de kenmerken & voorbeeld geven)
 Kwalitatieve meetniveaus (moet niet perse numeriek zijn, beperkt aantal waarden)
o Nominaal: categorieën
 Bv geslacht, ras, land
o Ordinaal: volgorde / ranking
 Bv hoe oud ge zijt, uw rang int leger, level van educatie, score op 10, …
 Kwantitatieve meetniveaus (numeriek, veel verschillende waarden)
o Interval: er is geen specifiek nulpunt  geen proporties
 Bv °C, °F, …  kan negatief zijn
o Ratio: er is een specifiek nulpunt  proporties
 Bv Kelvin, afstand in meter, gewicht in kg, …  kan niet negatief zijn

Relaties tussen variabelen
 Causal relationships:
o 1 variabele heeft een effect op de andere
o De Cause is de onafhankelijke variabele
o De Consequence is de afhankelijke variabele
o Niet elke relatie is causal!

, 3


Sample Testing
Sample & population
 Populatie: de verzameling van alle objecten dat je wilt analyseren (de dataset dus)
 Sample/steekproef: een deel v/d verzameling
o Onder voorwaarden zijn de resultaten v/d sample vergelijkbaar voor de populatie

Sampling method
Hoe kies je de elementen uit?

 Random sample: elk element uit de sample heeft evenveel kans om gekozen te worden
o (=Aselecte steekproef)
 Non-random sample: bepaalde elementen hebben een grotere kans om gekozen te worden
o (=selecte steekproef)
o Meestal niet representatief, omda ge zelf ewa kiest wa er in uw sample zit

Sampling errors
 Accidental sampling errors:
o Puur toeval
 Systematic sampling errors:
o Bv online survey: mensen zonder internet worden uitgezonderd
o Bv vrijwillige survey: enkel mensen die geïnteresseerd zijn doen mee
o …

Non-sampling errors
 Accidental non-sampling errors:
o Bv perongeluk het verkeerde antwoord aangeduid
 Systematic non-sampling errors:
o Bv het measuring equipment dat niet goed gekalibreerd is
o Bv de mensen liegen
o Bv gij hebt een effect op de mensen waardoor ze niet eerlijk reageren enz

, 4



Hoofdstuk 1: python
Packages
import numpy as np # "Scientific computing"
import scipy.stats as stats # Statistical tests

import pandas as pd # Data Frame
from pandas.api.types import CategoricalDtype

import matplotlib.pyplot as plt # Basic visualisation
from statsmodels.graphics.mosaicplot import mosaic # Mosaic diagram
import seaborn as sns # Advanced data visualisation
import altair as alt # Alternative visualisation system


Datasets
Dataset lezen
 titanic =
pd.read_csv('https://raw.githubusercontent.com/DataRepo2019/Data-
files/master/titanic.csv')
 soms moet ge het scheidingsteken zelf zeggen:
o android = pd.read_csv(linkblabla.csv', sep=';')
 of via google drive: (zien wa erin zit: !ls)
o from google.colab import drive
#drive koppelen om eraan te kunnen
drive.mount('/content/drive/')
ais = pd.read_csv('/content/drive/MyDrive/DSAI/data/ais.csv')
Eerste / laatste entries weergeven
 titanic.head(10)
 titanic.tail(10)
Eigenschappen dataset
 Algemene eigenschappen v/d dataset: titanic.info() OF titanic.describe()
 Aantal rijen: len(titanic)
 Aantal kolommen: len(titanic.columns)
 Aantal rijen & kolommen: titanic.shape
 Datatypes van elke kolom: titanic.dtypes
 Aantal kolommen van elk datatype: titanic.dtypes.value_counts()
 Eigenschappen van een datatype: titanic.Survived.describe()
o Of natuurlijk titanic[‘Survived’].describe()
 Unieke/verschillende values van kwalitatieve variabelen: titanic.Embarked.unique()
o Geeft de mogelijke waarden weer voor Embarked: [‘S’ ‘C’ ‘Q’ nan]
Indices
 Als er een ‘ID kolom’ is, moet je deze dan ook markeren als index
o titanic.set_index([‘PassengerId’])
R100,92
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached


Document also available in package deal

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
easyIT Hogeschool Gent
Follow You need to be logged in order to follow users or courses
Sold
78
Member since
5 year
Number of followers
30
Documents
23
Last sold
1 week ago

4,0

5 reviews

5
2
4
1
3
2
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can immediately select a different document that better matches what you need.

Pay how you prefer, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card or EFT and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions