DS - Python | Jul 07 - Aug 11 | Nimisha

Discussion in 'Big Data and Analytics' started by K Manoj, Jul 7, 2018.

  1. K Manoj

    K Manoj Moderator
    Staff Member Simplilearn Support

    Joined:
    Aug 4, 2017
    Messages:
    228
    Likes Received:
    19
    *thread locked for this batch learers.
    Post your questions below.
     
    #1
    _32344 likes this.
  2. _32504

    _32504 Member

    Joined:
    Jun 18, 2018
    Messages:
    9
    Likes Received:
    0
    I am not able to understand why I am getting additional comma in the output. It is working fine if the end index is extended till 3; also I am getting the expected output incase of list. The issue seems to be specific to tuple. Can someone please address the issue and propose the solution

    fam = ("liz", 1.73, "emma", 1.68, "mom", 1.71, "dad", 1.89)
    print(fam[0:1])

    Below is the output
    -----------------------------------------------
    ('liz',)
     
    #2
  3. _32504

    _32504 Member

    Joined:
    Jun 18, 2018
    Messages:
    9
    Likes Received:
    0
    Queries related to set
    1 : Output of set_1 is coming in order whereas that of set_2 is not in order
    2 : set_3 is not printing the unique objects whereas appending the same objects at the end of set_4 gives the desired output

    ##Set
    set_1 = {7,8,5,6,5,9,4,10,3,2,1,1,2,3,4,5,8}
    print("set_1 ", set_1)
    set_2 = {7,8,5,6,5,9,55,66,4,10,3,2,1}
    print("set_2 ", set_2)
    set_3 = ("Abhay", "Amit", "Amit")
    print("set_3", set_3)
    set_4 = {7,8,5,6,5,9,4,10,3,2,1,1,2,3,4,5,8, "Abhay", "Amit", "Amit"}
    print("set_4 ", set_4)

    Output
    set_1 {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
    set_2 {1, 66, 3, 4, 5, 6, 7, 8, 9, 10, 2, 55}
    set_3 ('Abhay', 'Amit', 'Amit')
    set_4 {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 'Abhay', 'Amit'}
     
    #3
  4. Nimisha Pandey

    Trainer

    Joined:
    Aug 4, 2017
    Messages:
    9
    Likes Received:
    3
    Hi Learner,

    set_3 is not a set rather a tuple. since you used '()' to define it in place of '{}'
     
    #4
  5. _32504

    _32504 Member

    Joined:
    Jun 18, 2018
    Messages:
    9
    Likes Received:
    0
    Not able to understand the output of below statements from 14th July class

    import numpy as np
    a = np.array([[1,2,3,4],
    [5,6,7,8],
    [9,10,11,12]])

    print(a[[0,0],[1,1]])
    print(np.array([a[0,1],a[0,1]]))
    =================================
    My expected output
    [1, 6]
    ==================================
    Output
    [2 2]
    [2 2]
     
    #5
  6. tarun_saahil(1359388)

    Joined:
    May 29, 2012
    Messages:
    3
    Likes Received:
    0
    Hi Nimisha,

    Following your last class, below are the answers to the elementary questions, please share your inputs or comment in case of any issues. We are not able to understand last two questions where confidence interval is provided and expected outcome is average. Please validate answers to the below questions and help to understand the other two questions:

    Q1 What is the probability that a randomly selected score is between 600 and its mean.
    Ans: 35.54%
    Q2 What is the probability of obtaining a score more than 700.
    Ans: 1.97%
    Q3 Score that is less than 550.
    Ans: 71.23%
    Q4: Score between 300 and 600.
    Ans: 82.92%
    Q5: Suppose during any hour in large departmental store, the average number of shoppers is 448,
    with the standard deviation of 21 shoppers. What is the probability that a random sample of 49
    different shopping hours will yield a sample mean between 441 and 446 shoppers.
    Ans: 24.27%
    Q6: Mercury makes a 2.4 lt V-6 engine, The Laser XRi, used in speedboats. The companies engineer believe
    that the engine delivers an average power of 220 horsepower and that the standard deviation of power
    delivered is 15 horsepower. A potential buyer intends to sample 100 engines(each engine to be run a
    single time). What is the probability that the sample mean will be less than 217 horsepower?
    Ans: 2.28%
    ***********************************************************************************************************
    Not able to understand and solve below two questions:
    ***********************************************************************************************************
    Q7 Comcast, the computer services company, is planning to invest heavily in online television services. As
    part of the decision, the company wants to estimate the average no of online shows a family of four would
    watch per day. A random sample of n=100 families is obtained, and in this sample the average no of shows
    viewed per day is 6.5 and the population standard deviation is known to be 3.2. Construct a 95%
    confidence interval for the average no of online television shows watched by the entire population of
    families of four.
    Q8 A stock market analyst wants to estimate the average return on a certain stock. A random sample of 15
    days yields an average (annualized) return of Xbar=10.37% and a standard deviation of s=3.5%. Assuming
    a normal population of returns, give a 95% confidence interval for the average return on this stock.
     
    #6
  7. Kuldeep Mandloi

    Joined:
    Jul 19, 2017
    Messages:
    3
    Likes Received:
    0
    I am unable to logon to today;s live class for 9:00 AM CDT. Is there any issue? Or only I am facing this?
     
    #7
  8. _33076

    _33076 Member

    Joined:
    Jun 25, 2018
    Messages:
    2
    Likes Received:
    0
    Hello All,
    Guys can we extend this 3 month session to 6+ months etc. ? Anyone ? Is anyone taking AI masters in continuation ?
     
    #8
  9. Pchiita

    Pchiita Member

    Joined:
    Apr 30, 2018
    Messages:
    5
    Likes Received:
    0
    may anyone share the google drive link... thanks
     
    #9
  10. Nimisha Pandey

    Trainer

    Joined:
    Aug 4, 2017
    Messages:
    9
    Likes Received:
    3
    #10
  11. _33076

    _33076 Member

    Joined:
    Jun 25, 2018
    Messages:
    2
    Likes Received:
    0
    Hello ,
    After I proceeded with complete AI course, my previous enrollment got over-ruled. Can any one provide today's class notes? Any link? Meanwhile I am discussing this with Support Team.
     
    #11
  12. _33573

    _33573 New Member

    Joined:
    Jun 29, 2018
    Messages:
    1
    Likes Received:
    0
    Hello Nimisha mam, I am not able to solve these two questions, please help
    1)- Comcast, the computer services company, is planning to invest heavily in online television services. As
    part of the decision, the company wants to estimate the average no of online shows a family of four would
    watch per day. A random sample of n=100 families is obtained, and in this sample the average no of shows
    viewed per day is 6.5 and the population standard deviation is known to be 3.2. Construct a 95%
    confidence interval for the average no of online television shows watched by the entire population of
    families of four.
    2)- A stock market analyst wants to estimate the average return on a certain stock. A random sample of 15
    days yields an average (annualized) return of Xbar=10.37% and a standard deviation of s=3.5%. Assuming
    a normal population of returns, give a 95% confidence interval for the average return on this stock.
     
    #12
  13. Nimisha Pandey

    Trainer

    Joined:
    Aug 4, 2017
    Messages:
    9
    Likes Received:
    3
    Hi,
    the codes for today's class is shared in the one drive
     
    #13
  14. Putta Vinod

    Putta Vinod New Member

    Joined:
    Dec 12, 2017
    Messages:
    1
    Likes Received:
    0
    madam i am not understanding about these two questions in project of New York City 311 calls
    can you help me in this

    o Plot a bar graph of count vs. complaint types

    Ø Visualize the complaint types

    o Display the major complaint types and their count
     
    #14

Share This Page