That concludes general questions. We turn now to First Minister's questions. 1. Ruth Davidson Thank you, Presiding Officer. Figures this week by the children's reporter revealed that 254 children under the age of 16 were referred to them for carrying knives or other weapons last year. That's up 11 per cent, so we know that it's a growing problem. Can I ask the First Minister? Of those 254 incidents, do we know how many involve canג pants or other weapons being carried within still grounds? First Minister. I do not have those statistics available to me today. If they are available to me today, if the breakdown is available, I will certainly make it available to Ruth Davidson and indeed to the wider Chamber. We know, and we know from some extremely tragic cases recently, that there is an issue. I am sure that there are not many countries of some young people y вони a composition y ll kabaradau yn nhw. Allwch i ddim ziwethaf bod gymbr partsisi suggests ynwalla yn y bagus yma, ac fod yn enghyd yn llwg indeb washbeth cy Department wedi tras-byllwedig iawn, beth y mae'r iawn mae'n enghyd i'r hemr fel gwasiaeth gyma che methu. Ysgol ym mwneud iawn i'r chanell ar terribleboi a chywh sydd fydd iawnell hwy��� y mwy defnydd ac mae'n ymgwy passenger ymwyaflennwyd ac yn hyn yn cyrrybus. Afferyddheithio! S秋f番! Felly, mae'r defnyddio, yn dweud hynny, y dyfodol niw gwaith gyda'r ffordd, oherwydd, rwy'n ddim yn ymddylch gwaith gyda'r Ffurdd. Diolch yn fawr, maen nhw. Maen nhw'n ddiddordebau ar gyfer ydyn ni, yn ddigonol, a'u ddiddordebau yn ddiddordeb. Rwy'n ddigonol o'r ffordd, oedd mae'r ddiddordebau a'r ddiddordebau a'r ddiddordebau a'r ddiddordebau a'r ddiddordebau a'r ddiddordebau a'i ddiddordebau a'r ddiddordebau developed and put in place such a policy? The First Minister There will be a range of discussions that take place between the Scottish Government and councils. Again, I am happy to give a full update in writing to Ruth Davidson about the current state of circumstances in respect of guidance. Ruth Davidson is right to talk about the report and the action that has been taken after the report following the tragic death of Bailey Gwynn. Since the independent review into that tragic death, we have been ffocused on implementing the two specific recommendations directed to the Scottish Government. Members will recall that those recommendations centred on improving the resilience of schools to the threat posed by weapons and to give consideration to amending the law in relation to searching pupils. The second recommendation was about further legislative controls that can be brought to bear on the purchase of weapons online. Ministers have considered the issue of violence and knife crimes in schools very carefully and have taken advice from a wide range of stakeholders. Those stakeholders do not support the introduction of a new search power that has been introduced for teachers. Indeed, that was rejected and opposed by the teaching profession. Those, of course, are the recommendations that were directed to the Scottish Government. Ruth Davidson is also rightly asking about the recommendations for individual councils. It is important that councils have the right processes in place and that all schools have the right policies in place. Through our officials in the education department of the Scottish Government, we will continue to act to make sure that that is the case. Schools are also supposed to monitor and record every time that a child is searched. Specifically, the guidance requires that any incident where a decision is made to undertake a search of a child or a young person, or where a weapon is suspected or found, must be recorded. Can the First Minister confirm that every Scottish council now operates such a policy and that all instances of pupils being searched on suspicion of carrying a weapon or of weapons being found are now recorded locally, collated and publicly accessible? Of course, it is for councils to make sure that they are taking the action that adheres to the guidance in all respects of that guidance. Let me say quite clearly today that I would expect, and I know that the Education Secretary expects councils to do exactly that. That, of course, would include the aspects of the guidance that relate to both monitoring and reporting of young people being searched or of young people being found to be carrying knives or other weapons. I should stress, of course—I am sure that Ruth Davidson will understand at this point—that it is fundamentally for councils to make sure that they are taking action to adhere to that guidance. Of course, there is a responsibility on the part of the Government, and we will always seek to discharge that responsibility to make sure that we are taking whatever action is necessary to ensure that all the correct policies are in place and that guidance is being followed. Ruth Davidson Recognise what the First Minister is saying about the incumbency being on councils to follow the Scottish Government's recommendations. However, in a large number of cases, the information is not collated or in any way publicly accessible. In response to recent freedom of information requests, nearly half of Scottish councils were unable to confirm the number of weapons confiscated from pupils in their areas because the information was not held centrally. That is information that I think that parents and the wider public should have a right to know. The fact that it is not fully accessible means that we have no meaningful picture of the extent of the problem in any area. In the wake of Bailey's death, Aberdeen City Council has brought forward measures to ensure a clear picture of knife possession in schools and it has introduced an anti-knife crime policy. Does the First Minister agree that it is time that all councils met that same standard and will her Government undertake to examine this matter again to ensure that all schools are the safe environment that parents have the right to expect? The First Minister has raised an issue of concern, and she is right to do so. I certainly give an undertaking and commitment today to look further into the specific points that she has raised at today's session of First Minister's Questions. I agree that we would want to see all councils operating against best practice in Aberdeen City Council for very tragic reasons, of course, because it has to look very carefully and critically at the policies that it has in place. I should say that I genuinely do not mean to say this in any hard political sense. We will frequently in this chamber be criticised for seeking to overly direct councils, and members across the chamber sometimes accuse us of a centralising instinct in trying to do that. Obviously, I do not accept that characterisation. There is always a balance for us to strike between allowing local authorities to discharge their responsibilities, and it is the responsibility of local authorities here to make sure that guidance has been adhered to on the one hand, but on the other hand making sure that we are discharging our responsibilities as a Government to make sure that that happens. I am very acutely aware, particularly in issues like this, that parents listening to this will not be particularly concerned about whose responsibility it is. What parents will want to know is that their schools are as safe as possible for their young people, and that is the responsibility that the Scottish Government takes very seriously. I will look further into, as will the Deputy First Minister, to the points that have been raised today, to consider carefully whether there is further action that the Scottish Government requires to take. In addition to the kinds of actions that are the responsibility of councils, the Scottish Government also takes a range of different actions to try to reduce knife crime, not just in our schools, but generally. That includes, for example, the No Knives Better Lives Youth engagement programme, which has received £3 million of funding since 2009. It is perhaps relevant to point out that 25 local authorities are, as we speak, involved in delivering that programme. We also invest heavily in the national violent reduction unit. There is a range of actions to make sure that we are reducing knife crime. We know that, for adults, the length of sentences for knife crime has increased in recent years. To go back to schools, I think that every parent wants to know that, when they send their child to school of a morning, the school is as safe as possible for young people. That is the case for the vast majority of young people in the vast majority of days in the year right across our country. However, if we need to take action to make sure that that is the case for every single young person, for councils and for Government, it is our responsibility to do so. Earlier this week, the Parliament voted in favour of calling for a halt to the roll-out of universal credit across the United Kingdom. The roll-out so far is badly flawed, and the six-week delay will cause untold misery for tens of thousands of families up and down this country. The Parliament now stands with most of civic Scotland in calling for a halt to the roll-out until the structural issues that are built into the system are resolved. Will the First Minister and her Government now make the strongest possible representations on behalf of Parliament and the people of Scotland to stop the roll-out of universal credit? Yes, we will. Indeed, we have already been doing that and making an argument to the UK Government that universal credit should not be further rolled out until it can have confidence and demonstrate to the public its confidence that that system works properly. I recall visiting Inverness during the recent election campaign and talking there to people who operate a food bank but also to people who are already recipients of universal credit, who told me about the delays and the impact and consequences of those delays—people getting into debt, people running up significant rent arrears and huge misery, stress and anxiety being caused to some of the people in our country who are already in a very vulnerable situation. I think that that is completely unacceptable. I do not think that any Government in good conscience should continue with the roll-out of universal credit while those concerns continue. We will continue to make that case strongly to the UK Government. Of course, as well as the vote in the chamber this week, this week also saw coming into force some of the flexibilities around universal credit that this Government has insisted on using new powers, allowing for more frequent payments and for housing components to go direct to landlords. That is perhaps a small way but a significant way in which we can help to make sure that the most vulnerable are being properly cared for, but I have significant concerns, very serious concerns about universal credit and the misery that it will cause, and I hope that we can join together to call on the UK Government to do the right thing. Thank you, Presiding Officer. I think that where this Parliament can work together, this Parliament should work together in the interests of the people of Scotland. This morning, we have learned from the Macmillan cancer support that the cuts to employment support allowance are affecting nearly 300 people living with cancer in Scotland. Let me be clear, those are cruel Tory cuts that make a mockery of Theresa May's claim and, indeed, Ruth Davidson's claim that the Tories want to build a country that works for everyone. Labour will fight those cuts in Westminster, but can we protect people now? Reversing cuts for people living with cancer would cost £400,000. Reversing them for everyone affected by that would cost £14 million next year. Will the First Minister use the powers of this Parliament to reverse those cuts and support those people in their time of need? As I think we have demonstrated by our actions, this Government will act where we can to mitigate the worst impacts of UK welfare cuts. Since 2013, we have already invested more than £350 million to support low-income families who have been affected by the changes that we have seen already. Of course, we know that the benefit cuts imposed by the UK Government since 2010 are expected to reduce welfare spending in Scotland by almost £4 billion a year by the end of this decade. We will look carefully at the case that Macmillan cancer support is making today. As we heard just before, the First Minister's question started. The draft budget of the Scottish Government will be published in December, and we will consider that in line with other decisions that we have to consider. It is important to point out, and I am sure that Alex Rowley is aware of this, that employment and support allowance is not one of the benefits that is being devolved to this Parliament. It will remain a reserved benefit. Of course, it is one of the benefits that is to be rolled into universal credit. Finally, we will mitigate where we can, but, as I have said previously, all of us across this Parliament must appreciate that, when the UK Government makes the cuts wrong-headed, and in many respects, this one included deeply immoral cuts, it saves money from doing that. It does not pass a portion of that saving on to the Scottish Government, so any mitigation that we put in place involves us taking money from other parts of the Scottish budget. We will do that where we can, but I think that everybody looking at this and looking at the scale of the cuts that I have just spoken about, £4 billion a year by the end of this decade would know that the Scottish Government cannot mitigate every welfare cut that the UK Government makes. Of course, if we had power over all of those benefits and all of the money that supports those benefits, we could take very, very different decisions. I hope that one day Labour will join us in calling for the complete devolution of all welfare powers and responsibilities and budgets to this Parliament. Alex Rowley. The First Minister and her programme of government did announce that she was bringing forward a number of papers that would set the case for more powers for this Parliament. Certainly, the Labour Party will look forward to those papers coming forward, where we can work together and where it makes sense to have powers in this place, then that is where the powers should be. I also make clear that I understand the point that she makes about continually mitigating the welfare cuts that are coming from the Tories. Labour's answer to that is that we want a general election as soon as possible. We have a Government and Westminster that is bankrupt of ideas and no place to go. We will work for that general election and work to put Jeremy Corbyn into Downing Street. The £400,000 from a Government budget to £30 billion is not a lot to stop the Tory attack on cancer patients, but for those people and their families it will certainly mean a lot. I hope that the First Minister will look at that. If the First Minister will not take action, then Labour will take amendments to the Social Security Bill in order to deliver that. Saying that we want a different type of social security system, one based on dignity and respect, is all well and good, but people want to see action. Will the First Minister move beyond those warm words, work with Labour to reverse those cuts and to address the appalling welfare reforms that are affecting so many people so badly up and down Scotland? There were a few points in Alex Rowley's question. I think that there was a question in there somewhere. First, in terms of his characterisation of the shambolic Tory Government at Westminster, I absolutely agree that watching the letters literally fall off the stage that yesterday was like watching an episode of Faulty Towers was so awful. However, there is a serious point here. This is a shambolic chaotic Tory Westminster Government that is doing real damage day in and day out to people right across Scotland and right across the UK. It is because of that that I continue to be so disappointed when I hear indeed both of the candidates for the Labour leadership just now talking about how they would in no circumstances ever work with the SNP. In other words, Labour seems still to be in a position where they would actually prefer to see a continuation of a Tory Government than ever work with the SNP. That beggars belief and leaves people across this country utterly astonished. Finally, on the specific issue of mitigation of cuts, we will look at all ways in which we can mitigate Tory welfare cuts. I heard Alex Rowley say that Labour would put amendments down to the social security bill. I make another suggestion that Labour brings forward proposals in the budget process, because it is the budget process that sets out how we pay for all of those policies. That would be something that I think Labour should agree to do today. The very final point that I want to make is this. I welcome—if Alex Rowley has suggested, as he seemed to do at the outset of his question—that Labour's position is changing on the devolution of welfare. I warmly welcome that. We will, as he said, publish a paper setting out again the case for 100 per cent devolution of welfare to this Parliament. When that comes, unlike the position that Labour took in the Smith's commission, I hope that we have Labour standing with the SNP Scottish Government in favour of welfare powers lying with this Parliament, not in the hands of a Tory Government at Westminster. We have a number of constituency supplementaries, the first from Oliver Mundell. Thank you, Presiding Officer. This week, EME furniture-based in Sankirk, in my constituency, has closed its doors after 50 years, resulting in significant local job losses. Only last year they have been talking about millions of pounds of investment and doubling their workforce. The company blamed procurement issues with Scotland Excel for the decision. Can the First Minister therefore tell me what the Scottish Government is doing to ensure that Scotland's small and medium-sized enterprises can compete for public sector contracts? Will she offer her reassurances to the workforce that all possible support will be given at what is a difficult time? First, on the issue of procurement, the Scottish Government has, over the past few years, made a number of amendments and reforms to our system of procurement, specifically designed to make it more streamlined, more transparent and enabling it to help more small and medium-sized enterprises across our country. We will continue to look for opportunities to do that even further. Of course, I was very disappointed to hear of the closure of EME furniture in Sankirk. I know that this will be an exceptionally difficult time for the affected staff, their families and indeed for the wider local area. Scottish Enterprise has already engaged with EME to explore all possible options for supporting the business to try to avoid this outcome. Unfortunately, the company is now taking the decision to close the site. Scottish Enterprise will continue to engage with the company and are now working to identify any and all possible future opportunities for both the site and its workforce. Our partnership action for continuing employment team has also made contact with the company to offer assistance to the workers affected. Christine Grahame Is the First Minister aware of a recent care inspectorate report on services for older people in the Scottish Borders, which among its many criticisms identifies delays and assessments compounded by delays in providing services? For example, I have one constituent admitted to the Borders general hospital in February, not assessed till June and is still waiting for his care package, even as I speak, by my calculation that is eight months. Does the First Minister therefore share my concerns that, admirable, though the integration of health and social care is, it is actually not working in practice? I am aware of the inspection report that Christine Grahame referred to. It is very disappointed that it says that services have fallen short of the high standards that patients have a right to expect. I am also concerned that the leadership and governance issues identified and the impact that they have had on patient care. I know that the health secretary has already spoken to both the health board and the leader of the council about those issues, and Government officials are ensuring that healthcare improvement Scotland works with the board to take all necessary improvement actions. I know that NHS boarders have already taken steps to improve leadership and governance, including learning from other NHS boards. Christine Grahame raised a specific constituency case in response to constituency cases. I do not have all the details of that, but if she wishes to make them available to the health secretary, she will make sure that that case is properly looked into. To ask the First Minister if the Scottish Government has done any research into the socio-economic impact in the south-west of Scotland region should the ferry companies operating out of the port of Cairnryan transfer the routes to Holyhead, as has been suggested, could happen by the ferry operators if the chronic lack of investment in local infrastructure by the Scottish Government continues, mainly the need to dual the A75 and A77 artery routes north and south from the port? Of course, it was the Government that supported the development of the Cairnryan port, so we recognised the importance on the economy and the social impact on the local area. We are also investing in infrastructure, including, of course, the upgrading of the A77. We will continue to take whatever actions are necessary to ensure that those important services stay in Cairnryan to the benefit of people who live in that area. The First Minister will have seen the shocking report of the way in which Gordon Edwards from West Lothian has been let down. Despite three referrals from his GP, Mr Edwards, who is only 17 years old, has been denied access to mental health services. Instead, he was sent to an employment service to get a job. How ill does he need to get before he gets the treatment that he needs? We expect our mental health services to provide appropriate treatment to individuals who present to them, including the individual that Willie Rennie has raised today. As Willie Rennie knows, we accept the challenge that Scotland, in common with other countries, has to meet the rising demand for mental health services, but we are investing additional resources into mental health services. We are seeing more people employed in our mental health services, and we will continue to take the action that ensures that that carries on being the case. In this year, for example, this is the first time that NHS investment in mental health will exceed £1 billion. Across a whole range of ways, we are taking action with health boards to improve services. I took the view when I was health secretary that, as long as one person, whether it is mental health services or any other health services, feels as if they have been let down by the system, then Government working with health boards and, increasingly, in the delivery of healthcare with local councils has a responsibility to continue to make improvements, and that is what we will continue to do in response to the kind of case that Willie Rennie has highlighted today. The trouble is that Mr Edwards is not alone. In Lothian, two in five young people who need support are not getting it on time. In Grampian, 65 per cent have been failed. Those figures mask people who are being bumped off lists to meet waiting times targets. Advocacy group Kindred say that young people have to be extremely ill before they get treated. Falkland House, well respected, said that young people need early treatment instead of being sent somewhere else first. The First Minister agreed to commission an audit of rejected referrals for mental health, but that was over six months ago. What was the outcome of that review, and how much longer do young people, like Mr Edwards, have to wait? As Willie Rennie said, we confirmed a review of rejected referrals and that that review would get under way this year. Of course, there has to be preparation to carry out that work, but we will take that work forward in the way that we have committed to and then we will share the findings of that with Parliament. As I have said not just today, but on many previous occasions in this chamber, we are seeing growing demand for mental health services. That is something that we should welcome because of the fact that what lies behind that is a reducing stigma for mental health. Willie Rennie and other members are absolutely right to bring to this chamber any case where services are not meeting the expected level or quality of service that patients have a right to expect. Equally, I will continue to talk rightly about the investment that we are committing to make sure that the improvements that everybody wants to see happen. I said earlier that investment this year will exceed £1 billion for the first time, but if you look at the trend of spend over the last decade, in 2007, £651 million was spent on mental health, that is now exceeding £1 billion. We are investing more than £50 million specifically to support reductions in waiting times, £10 million supporting new ways of improving mental health in primary care, £15 million supporting better access to CAMHS and innovation around the delivery of those services. Across a whole range of those issues, we are taking the action that people expect us to take to ensure that we see the improvement to services that people deserve and have the right to expect as well. Can I just be clear on what the First Minister has just said? She seems to be unaware of whether the audit has been concluded, but has it actually started? The work on the audit is under way. When we have concluded the audit, we will ensure that the findings of the audit are shared with Parliament. Like the range of commitments that we made in our mental health strategy, work is under way to deliver all of them, and we will continue to ensure that action is taken so that we meet those commitments and improve the services in the way that people expect. The fracking ban has rightly been met with some celebration across Scotland, but there are concerns from communities and from many SNP members that the ban is not yet legally watertight, as it merely extends a temporary break on planning decisions. Will the First Minister get the ban properly over the line by putting it on the same footing as the ban on new nuclear power stations and commit to using the licensing powers when they arrive? Of course. The ban on new nuclear energy in Scotland is also done through planning powers. That is exactly what we are proposing with the ban on fracking. Let me be clear. I think that to some ears it will sound as if some members are dancing on the head of a pill here. Fracking is being banned in Scotland end-of-story. There will be no fracking in Scotland. I do not think that that position could be any clearer. Members will also appreciate that, because the powers over licensing have not yet been transferred to this Parliament, we do not even have the power to do what some Claudia Beamish in particular is asking us to do in terms of legislation. What Paul Wheelhouse outlined to the chamber earlier this week is an effective way of banning fracking, as the precedent of nuclear energy demonstrates. It is also the quickest way of banning fracking. Those who, like me, do not believe that fracking should go ahead in Scotland, instead of continuing to have this abstract argument, should welcome the fact that fracking in Scotland is banned. Is the First Minister aware that the annual Scottish Survey just published shows that, as a nation, we are substantially overweight and adults are consuming less fruit and vegetables? That report comes just before obesity and cancer awareness week starts on Monday. Given that this Parliament has tackled successfully smoking and is now tackling alcohol misuse, does the First Minister agree that we now need to focus more on tackling Scotland's food culture? Although it is improving, it still sees Scotland living in a nation blessed with an abundance of nutritious, healthy food but with a very challenging health record. Does she agree that the forthcoming food bill has a big role to play? We also need to tackle issues such as multi-bag deals in supermarkets, which I was reminded of when, a few days ago, I saw a young people buying four donuts for his lunch. I probably should be careful not to single out the person that Richard Lochhead referred to. There is a serious issue here. We actually see rates of childhood obesity declining. They have declined from 17 per cent in 2014 to return to the rate that was seen in 1998, which is 14 per cent, but that is still too high. When I set out the programme for government last month, I said that I believe that it is time for us to show the same ambition as we have shown with alcohol misuse and smoking to the growing public health challenge of obesity. That is why we have indicated that we will bring forward a range of new measures to tackle obesity, including, for example, limiting the marketing of foods high in fat, salt and sugar, as well as a range of measures to help to tackle obesity. We need to continue to put across the messages around healthy eating, but we also have to continue to encourage young people to be more active. That is why things like the Daily Mile increase in PE provision in schools is so important. Richard Lochhead is right to identify that as a major public health challenge, and he is also right to talk about the potential of the food bill to help us to make sure that we increase healthy eating across our country. First Minister, last week, the Scottish Government announced that it will not establish a specialist environmental court or tribunal. When the UK leaves the EU, we lose the oversight of the European Court of Justice, the ECG, which has played a key role in overseeing and enforcing environmental obligations. The legal system of the UK does not allow us to fully replace the ECG. First Minister, will you please outline what actions the Scottish Government intends to replace environmental protections that are lost by Brexit, and will you reconsider your decision not to establish an environmental court? The Government is determined that, in our view, the wrong-headed decision to leave the European Union will not lead to any dilution or weakening of environmental protections or indeed employment protections or consumer protections or any of the other protections that people feel are so important. We will do that where we can through our devolved responsibilities. Of course, that is one of the reasons why we are so concerned with the terms of the withdrawal bill right now, because some of the powers that are currently resting in Brussels would end up being centralised at Westminster rather than coming here to allow us to take that action. We will act in whatever way we can, and we will make the case where we do not have the power for the UK Government to do so as well. However, there is no doubt that the weakening of regulation and protection is one of the things that people have the right to be concerned about in the Brexit process. On the issue of a specialist court, I recognise that we have a difference of opinion around that, but I think that it is important that, whether it is on environmental crime or regulation or any other matter, we do not somehow suggest that, just because we do not have a specialist court that those issues are not taken seriously within our wider justice and court system, because they very much are and will absolutely continue to be so. To ask the First Minister how the disclosure scheme for domestic abuse Clare's law has worked during its two years in practice. Safeguarding those suffering from or at risk of domestic abuse is an absolute priority for the Scottish Government, and we were pleased to support Police Scotland's decision to roll out a national disclosure scheme for domestic abuse. Two years on, Clare's law has assisted with over 2,000 requests and warned over 900 people of their partner's history of abusive behaviour. The scheme helps to highlight the day-to-day work of Police Scotland officers in helping to keep people safe, and we will continue to work closely with criminal justice and third sector partners to reduce and ultimately eliminate domestic abuse. I thank the First Minister for that reply, but does the First Minister agree with me that the disclosure scheme for domestic abuse in Scotland has successfully acted as a safeguard for individuals who may be a victim or at risk of domestic violence and that raising more awareness of the scheme would actually go even further to protecting people in Scotland from abusive partners? Yes, I think that that is an important point. When the scheme was first launched, the Government funded an awareness raising campaign. Given the benefits arising from the scheme already, we will certainly continue to work with Police Scotland ensuring that anyone feels that they are at risk can take advantage of the scheme. Last week, of course, the chamber also unanimously supported the creation of a new offence of domestic abuse. We know that, while reporting of abuse has increased, there are still many people who suffer in silence. That is why there will be a comprehensive publicity campaign for the new offence to ensure that people know that it will make it easier to hold domestic abusers to account, especially for acts of coercive or controlling behaviour. To ask the First Minister whether the Scottish Government will review the school inspection process. As I am sure that Liz Smith is aware, earlier this week, Education Scotland announced a significant increase in school inspections of over 30 per cent in this school year, beginning in April 2018. As a result, the number of school inspections will rise from 180 to 250 schools per year initially. That will strengthen the role of inspection as a crucial tool to support improvement and is one of a range of improvement approaches announced by Education Scotland to enable them to reach every school every year through a variety of different channels. Liz Smith, last November, Education Scotland could not confirm to MSPs on the Education Committee whether school inspection numbers had gone up or down. At the same meeting, they could not confirm how many full-time inspectors there were for 2017. Last week, it was revealed that key elements of historical school inspection data had been deleted. Will the First Minister accept that those are not the hallmarks that are required to inspire full trust in the administration of the school inspection process? To that end, will she now agree with the Conservatives and all the other opposition parties that the HMIE inspection process should be fully independent of Education Scotland? Of course, we will bring forward legislation on governance changes in education, and those issues I am sure will continue to be debated. The Education Secretary has set out his view on that. The issues are not identical—I know that they are not—but I remember when I was health secretary facing a similar decision about the role of health inspectors.  However, it is important that we also have a link between inspection and improvement. That is the link that risks being lost if we go down the route that Liz Smith is proposing today. Inspection is not there for its own sake. It is there to identify any failings or any areas where there needs to be improvement and then make sure that improvement is made. That is why the statement that the Deputy First Minister gave earlier this week about regional improvement collaboratives is such an important part of our reform agenda. We will continue to debate those issues in the chamber, but I hope that whatever the eventual outcome of that particular debate is, everybody will welcome the announcement this week of the increase in inspections that I have just set out. The extra inspections that are announced by Education Scotland will be helpful in supporting schools' work towards closing the attainment gap. The Scottish Government is only this week consulting on how it will measure that gap and progress. It is two years since the First Minister told us that closing the gap was her top priority. Does she not think that two years to get round to thinking about what she means by the attainment gap is a little well lethargic to put it kindly? No, we have been getting on with putting in place the national improvement framework, introducing standardised assessments that are now across the country that will inform the teacher judgment that we will then publish in terms of the percentage of young people meeting the required levels of curriculum for excellence. That is, for the first time, a comprehensive, very transparent indication of how not just our education system is performing nationally, but how individual schools and individual local authorities are performing as well. That is the action that we have already taken, but we have always said that there is not one single measure that should be necessarily used to measure attainment. That is why the consultation that was launched yesterday looks at a range of different measures to make sure that, as we continue to work to close the attainment gap, we are doing that in a way that respects and enhances the overall development of young people. That is what curriculum for excellence is all about. Iain Gray's characterisation is not, for the first time, not strictly accurate. We have been taking a series of steps to make sure not only that the money, for example, we are putting in through the pupil equity fund, is helping to close the attainment gap, but there are the measures to record that and there is a transparency that means ministers and the wider system is completely accountable to Parliament and the public. To ask the First Minister whether the Scottish Government will undertake a national audit of a number of people who are rough sleeping. The programme for government set out our national objective to eradicate rough sleeping. We are backing that commitment with a £50 million ending homelessness together fund. Of course, we also established a short-term homelessness and rough sleeping action group, which is chaired by the chief executive of homelessness charity crisis. That group, which meets today, will make recommendations on what further actions need to be taken on rough sleeping, including any additional information or data that we need to gather. I welcome the establishment of the working group on homelessness. Would the First Minister recognise that rough sleeping is sadly on the rise and that it is likely that we face a further increase in rough sleeping through a bleak winter and that there is an urgency to act? I am sure that she agrees that it is not acceptable for anyone to be sleeping on the streets anywhere in Scotland. Shelter confirmed that the number of homeless applications where the applicant slept rough the night before making the application increased by 10 per cent last year. In view of that, would the First Minister agree that it would be helpful to have a fresh assessment on the scale of the issue, albeit through the working group, because there has not been an audit since 2003, according to homeless action Scotland? I would ask the First Minister in a constructive manner to consider that, in going forward, there should be a housing-led approach and not a hostile led approach going forward. Recognising the work of the charity sector and local government partners who are key to this, does she agree that there is a case for the national roll-out of the housing first model, which I know that she has acknowledged in the past, which recognises the multiple disadvantages that homeless people face establishing stability in their life? I hope that she would agree that it can't simply be left to the charity sector, but the Government has to leave from the front. The Government is leading from the front, which is why we have established the £50 million fund that I have already spoken about and set up the expert group that meets for the first time today. Some of the issues—I am actually, as Pauline McNeill knows, very sympathetic to, but we set up an expert group to give us ordered recommendations on the actions that they think are most important for us to take forward. That may well include an audit, and if that is the case, of course, we will carry that out. There is also a debate about what she characterised as the housing versus hostile approach to that. Again, recommendations may come forward. One of the things that I think is most important is that we do not just see that as an accommodation issue—whether that is houses, hostels or often rough-sleeping—is the package of support that needs to go around people. That is why the housing first model that she talks about is important. I have already said that it offers opportunities for individuals with more complex needs to help to stabilise their lives and prevent repeat homelessness. Again, the reason that we set up the expert group is to look at this to make sure that we are doing the right things. We know that rough sleeping is increasing. I said that when I set out the programme for government. We also know, going back to Alex Rowley's question, that that increase in rough sleeping and homelessness generally is very much being driven by the kind of welfare cuts that we have already spoken about. Unfortunately, we cannot deal with all of this problem at source. I wish we could, but we can make sure that we are doing as much as we can to deal with the consequences, and we will continue to do exactly that. To ask the First Minister what the Scottish Government's responses to the concerns of front-line nursing staff in Scotland, which have been highlighted in the RCN report, safe and effective staffing nursing against the odds. The link between nurse staffing levels and high-quality care for patients is well established. Staff welfare is a top priority. We take staff's views on those issues very seriously. The RCN has called for safe staffing legislation, and as we set out in the programme for government, we intend to take that forward. Of course, the UK Government has given no commitment to similar legislation in England. In addition, we are committing an additional £40 million to create an estimated 2,600 extra training places over the next four years, and we will continue to work closely with the RCN and others to help to shape future action. Miles Briggs First Minister, in the last two weeks, we have heard warnings from the Royal College of GPs that Scotland is now 856 GPs short. This week, RCN Scotland predicted that Scotland is 2,800 nurses short. Obviously, the 2,600 are not going to cover that shortage, a situation that is now directly impacting on staff and patient care. Does the First Minister have been in control of our NHS for 10.5 years, not now accept that the Scottish Government's NHS workforce planning has been totally mismanaged? The First Minister No, I do not. There are almost 12,000 more people working in our health service today, compared to the situation when this Government took office. We are also, as I said, in relation to nursing students taking a range of actions, including the safe staffing legislation that I spoke about, an increase in intakes to preregistration nursing and midwifery programmes. Under the SNP, the Government has been an average of 1,000 more nurses in training every year, compared to the previous administration. As I said, we are spending £40 million on increasing training places. We have also kept the nursing bursary, which has been abolished by the Tories south of the border, which is leading to a rapid reduction in the numbers coming into nurse training in England. We will continue to take a range of actions in nursing and across other elements of the NHS workforce. I will end where I often do on questions about this. As we take all of those actions to try to increase the number of people coming into the NHS and the different professional groups within the NHS, we face the looming threat of Brexit, which is making it harder for those already here to stay here and contribute to our NHS. Of course, we will make it harder for us to recruit those who want to come here. I say to the Tories that, whether it is on this or welfare or any of those, it should shame on them for coming here to lecture others, while their own Government is doing so much damage to those things that we hold dear. That concludes First Minister's questions. I ask all members to remain seated for a second. I suspend the meeting until 2 p.m.


Hi, so this is my fifth tutorial class and today we will be considering problem from non-linear estimation, generalized linear model, dummy variable and also variance stabilizing transformation. So, here is the first problem from non-linear estimation. So, estimate the parameter alpha and beta in the non-linear model y equal to alpha plus 0.49 minus alpha into e to the power of minus beta x minus 8 plus epsilon. So, this is the non-linear model we need to fit that means we have to estimate the parameter alpha and beta from the following observation. So, you are given around 20 observations here and this one is non-linear model because of the fact that this is a function is it is a non-linear function of the parameters alpha and beta. So, now we will be solving this problem. So, the problem is to estimate alpha and beta of the non-linear model using the data. So, the residual sum of square can be written as you can say it is residual sum of square or may be the least square function which is alpha s alpha beta this is equal to y u this is the u th observation and corresponds to the response variable y minus f x u alpha beta sum over u and this is the least square function and we are given this is the non-linear function in alpha and beta. So, I can write this as y u minus alpha minus 0.49 minus alpha e to the power of minus beta x u minus 8. So, this is the non-linear function we are given and we have to basically estimate alpha and beta in such a way that this least square function is minimum that is that is what the least square method is. Now, since the given function f or the model is non-linear. So, all the normal equations are going to be normal and it is very difficult to solve system of non-linear equations. So, what we do is that what we have learned in the non-linear estimation is that we approximate this non-linear function by Taylor series and we approximate this non-linear function by a linear function. So, here is the Taylor series involves the derivative of this function and let me write down this is called the linearization.  So, we linearize this non-linear function by Taylor series and the derivative of this function with respect to alpha is 1 minus e to the power of minus beta x u minus 8. And the derivative of this partial derivative with respect to beta is equal to minus 0.49 minus alpha e to the power of minus beta x u minus 8.  So, now we write this non-linear function I mean of course, we approximate this non-linear function by linear function using Taylor series and here is the approximation.  So, that is equal to 1 minus e to the power of minus beta beta naught at the point alpha naught beta naught. So, beta naught x u minus 8 into alpha minus alpha naught plus derivative of this function with respect to beta at the point alpha naught beta naught. So, that is minus 0.49 minus alpha alpha naught of course, into e to the power of minus beta naught x u minus 8 and then beta minus beta naught. So, now you can see that this one is linear in alpha beta. So, this is a constant term this one is also constant because we have plugged the value alpha naught beta naught. So, this is linear in alpha beta.  So, what we did is that we wrote this non-linear function using I mean we wrote this function approximate this non-linear function by a linear function in alpha beta using Taylor series expansion. So, now we have to estimate the parameter alpha and beta for a linear function and we know how to do it using the multiple linear regression technique. Now, we can we are in the position to use ordinary least square technique.   Now, here you can see that you know this one is multiple linear regression model involving two parameter. Well, I would like to write this now in matrix form. So, I will write use the notation y naught for response vector.  So, this is sort of the coefficient matrix and my parameter vector theta naught is equal to alpha minus alpha naught and beta minus beta naught. So, we want to estimate the parameter alpha naught sorry alpha and beta and we approximated this function about alpha naught and beta naught. Well, and we will see you know how to estimate alpha beta because that is what our m is and epsilon is of course, epsilon 1 epsilon 2 up to epsilon n. I am sure that you understand what is the meaning of this one. See, this one is the partial derivative of the non-linear function f with respect to alpha at the point alpha naught beta naught. So, this one is basically 1 minus e to the power of minus beta naught into x minus sorry x 1 minus 8 and z 2 1 is basically minus 0.49 minus alpha naught and x 1 minus 8 e to the power of minus beta naught x 1 minus 8 e to the power minus 8. So, you can see that this is the derivative of the function f with respect to beta at the point alpha naught beta naught. Similarly, you know this one is 1 minus e to the power of minus beta naught x n minus 8 and this one is minus 0.49 minus alpha naught x n is minus 0.49 minus alpha naught x n minus 8 e to the power of minus beta naught x n minus 8. So, this is what the z naught matrix is and we know that in matrix from this can be now written as y naught is equal to z naught x beta. So, z naught theta naught plus epsilon and we know that then theta naught hat which is equal to z naught prime z naught inverse z naught prime y naught. So, let me put some more notation also. So, this one I will call alpha minus alpha naught I will call that theta 1. In fact, you know two many notations for this non-linear estimation. So, theta 1 naught is basically alpha minus alpha naught theta 2 naught is basically alpha sorry beta minus beta naught. Well, so we have found the least square estimate of theta naught. So, this is the least square estimate. So, what we have observed is that we got theta naught hat which is equal to theta 1 naught hat theta 2 naught hat that is alpha 1 minus alpha naught beta 1 minus beta naught. So, estimate of all these things. So, what we do is that if we take the z naught begin the iteration with the initial guesses say alpha naught equal to 0.30 and beta naught which is equal to 0.02 then what we do is that actually we iteratively we improve this alpha beta. So, the first iteration say 0 we have alpha 0 we took alpha 0 as 0.30 and beta 0 as 0.02 and we approximated the function about this point alpha naught beta naught using Taylor expansion and we made it linear. So, once we have the linear approximation of the function using the Taylor series then we use the least square technique to estimate the parameters. So, this is how we got the estimation of the least square estimation of the parameters theta and then what we do is that I should not write 1 here. What we have at this moment is that we have theta 1 naught hat and which is equal to alpha 1 minus alpha naught and also we have theta 2 naught hat which is equal to beta 1 minus not in fact beta alpha 1 it is alpha minus alpha naught, but what we do is that we consider this alpha 1 as improvement of alpha. Now, alpha 1 is alpha naught plus theta 1 naught hat and beta 1 is equal to beta naught plus theta 2 naught hat. So, we started with alpha naught beta naught and then now the improved value of alpha 1 and beta 1 are in the first iteration they are 0.8416 and 0.1007 and what we do is that again we now we place this alpha 1 and beta 1. So, we place alpha 1 and beta 1 in the same role as alpha 1 and beta 1 in the same role as alpha 1 naught beta naught and we go through the same process. So, this will lead to another revised estimate say alpha 2 beta 2 and so on. So, we started with alpha 1 beta 1 now we have sorry we started with alpha naught beta naught now we have alpha 1 beta 1 and again next step in the next iteration we will have alpha 2 beta 2. So, at the jth step we will have alpha j plus 1 which is equal to theta 1 j plus beta 2. So, we continue this process. So, this process continue until alpha j plus 1 minus alpha j is less than delta and beta j plus 1 minus beta 2 j plus beta 2 j plus beta 2 j plus beta j is less than delta. So, delta is a pre specified small number. So, in our case what we do is that so at this moment we have alpha 1 beta 1 is this right this is my alpha naught beta naught. So, I should write here alpha j beta j. So, in the first 0th iteration they this is alpha naught beta naught alpha 1 beta 1 and in the next iteration I will get you can check that the value of alpha 2 will be 0.3901 and beta 2 will be 0.1004. The third iteration it will be 0.3901 and here it is 0.1016 and the fourth iteration you will see you know see alpha is not changing. So, 0.3901 and 0.1016. So, at the fourth stage so you see that there is no difference between the third and fourth step and the fourth iteration you will see you know see alpha is not changing. So, 0.3901 and 0.1016. So, at the fourth stage so you see that there is no difference between the third and fourth step and the fourth step so alpha 4 minus alpha 3 is less than equal to this quantity. I mean similarly beta 4 minus beta 3 is there is in fact no difference this 0. So, we can stop here. So, this is the first example from the non-linear estimation. Next we will consider a problem from dummy variables. So, dummy variables are utilized to separate blocks of data. So, here is an example look at this data. I do not know whether to fit two straight line one straight line or what. So, we have two sets of data set A and set B and we do not know whether to fit one straight line to all the data together or two straight line or what we do not know. So, he has two sets of x y data given below which cover the same x range. How do you resolve this dilemma? Describe and give model details and things he needs to do. So, we have learned the use of dummy variables. So, we will be fitting a general model involving two dummy variables including say Z naught for this problem. So, this problem. So, if we attach a dummy variable Z to distinguish the two groups, we can look at all four possibilities. You understood what I mean by four possibilities. So, the general model is y equal to beta naught plus beta 1 x plus Z into alpha naught plus alpha 1 x plus epsilon. So, Z is equal to 0 for set A and it is 1 for set B. So, we can see and this can be written of course, as beta naught plus beta 1 x plus alpha naught Z plus alpha 1 Z x plus epsilon. So, this is the model we are going to fit and you can see that here it is a multiple linear regression model and what is the x matrix here? So, we have the x matrix has 1, 2, 3, 4 column. So, the first column is all 1 of course and let me put Z naught I can put also here or X naught or let me put only 1 here and then I have I will have a column for x, I will have a column for z and I will have a column for z x. So, first set has four observations and the observations are 8, 0, 12, 2. So, I will put them 8, 0, 12, 2 and for the first set set A my z is equal to 0. So, 0, 0, 0, 0, 0 and then z x is of course, all 0. So, this is for first set and for the second set 1, 2, 3, 4 and you can check that the x values are 9, 7, 8, 6 and for the second set or set B z is equal to 1. So, I will put z equal to 1, 1, 1, 1 and then of course, z x is equal to 9, 7, 8, 6. So, this is what the what my x matrix is in matrix notation of course, you know I am sure that you understand the difference between this x and this x. So, the model can be now written as y equal to x beta plus epsilon and of course, this beta vector is beta naught, beta 1, alpha naught. So, this beta is beta naught, beta 1, alpha naught, alpha 1. So, you know how to fit this model, this beta hat is equal to just x prime x inverse x prime y. So, let me write down the fitted model now. So, the fitted model is y hat equal to 1.142 plus 0.506 x minus 0.048 z minus 0.036 z minus x z. So, this is my fitted model. Now, the question is whether a single straight line is sufficient. If there is not much difference in the response level, we can go for a single straight line and fit, but we need to see what we have the general model. Now, we can test whether this is ok, I mean one single line is sufficient for that what we have to test is that we have to test the hypothesis H naught that alpha naught equal to alpha 1 equal to 0 because we have considered the general model is this one. Now, if I test to test that whether a single straight line is enough, we have to test that alpha naught is equal to alpha 1 equal to 0. And you know how to test this right using the extra sum of square technique. So, F statistics is S S regression for the full model right minus S S regression for the restricted model right. So, the restricted model does not involve these two terms and this by degree of freedom 2 by M S residual before doing all these things you know just I will construct the ANOVA table for the full model. The source total there are two terms. There are eight observations the degree of freedom is 7 and the regression has four parameters. So, it will be 3 and the residual has degree of freedom 4. Now, the restricted model has only two parameters. So, this will have degree of freedom 1. So, 3 minus 1 is equal to 2 and you can check that this is equal to 0.1818 by 2 by M S residual is 0.3272 by 4 which is equal to 1.11. Now, this F has degree of freedom 2 4. Now, compute the sorry you just check the tabulated value of F. F 0 5 24 is equal to 6.94. So, my observed value F which is equal to 1.11 is smaller than this one. That means H naught is accepted H naught is accepted. That means we can go for a single straight line fit. So, this is in the problem I wanted to discuss for from dummy variable topic and we have another problem involving dummy variable. So, it says that an experimenter has two sets of data of x y type and wishes to fit a quadratic equation to each set. See also wishes to test if the two quadratic fits might be identical in location and curvature, but have different intercept values. Explain how would you set this half for her? So, what she has is that she has two sets of data on x and y and she wants to fit quadratic equation. So, she should go for the general model like y equal to beta naught plus beta 1 x plus beta 1 1 x square plus z alpha naught plus alpha 1 x plus beta 1 1 x square plus alpha 1 1 x square plus epsilon. So, of course, you know that z equal to 0 for set a and 1 for set b. Now, she wants to check whether she can go for two parallel quadratic fit for testing to parallel quadratic. What you mean by parallel quadratic? They have the same location and curvature only they differ in the intercept. What you have to test is that you have to test whether alpha 1 is equal to alpha 1 1 is equal to 0. So, you test the hypothesis that alpha 1 equal to alpha 1 1 equal to 0 for test for testing two parallel quadratic fit this one is appropriate. I am sure that you understand how to test this hypothesis using extra sum of square technique. Now, I will be considering a problem from a topic called transformation and weighting to correct model in adequacy and there we talked about variance stabilizing transformation. So, I will be considering one problem from variance stabilizing transformation. Well, here is the problem consider the simple linear regression model y i equal to beta naught plus beta 1 x i plus epsilon i where the variance of epsilon i is proportional to x i square that is the variance of epsilon i is equal to sigma square x i square. So, this is this means the assumption of constant variance is not satisfied. So, usually if epsilon i follow epsilon i the variance of epsilon i is equal to sigma square and then we go for the ordinary least square technique, but that is not true here variance is changing for different i and it is proportional to x i square. Suppose that we use the transformation y prime which is equal to y by x and x prime which is equal to 1 by x is this variance stabilizing transformation. First solve this problem. So, we start with the model y i equal to beta naught plus beta 1 x i plus epsilon i then I am considering the transformation y i to y i by x i and then the model becomes beta naught by x i plus beta 1 plus epsilon i x i. So, if I call this as y i prime then y i prime is equal to beta naught and my x i prime is 1 by x i plus beta 1 plus epsilon i prime. So, this is the transformed model now you can check in this transform model variance of epsilon i prime is equal to variance of epsilon i by x i and we know that variance of epsilon i is sigma square x i square and then by x i square. So, now the variance of transform error e i prime is constant. So, the answer to the first problem is that yes it is variance stabilizing transformation. What are the relation between the parameters in the original and the transform model? Well what is the relation? I hope that the relation is so here you can see the this is my transform model. So, the slope in the original model becomes intercept in the transform model and the intercept in the original model becomes slope in the transform model I mean that is what I feel. So, next the next problem is that suppose we use the model of sorry suppose we use the method of weighted least square with w i is equal to 1 by x i square. Please recall what is weighted least square is this equivalent to the transformation introduced in part 1. I mean considering weighted least square we with this weight is it same as the transformation we considered in the in part 1. So, that is the question. So, you have to recall what is weighted least square. Let me solve this problem. So, what is weighted least square? Weighted least square is about finding the least square estimate of regression coefficients, but we consider the weighted least square function estimate the parameters. So, the weighted least square function least square function is s say beta naught beta 1. So, what we do in the original model is usual case is that we just minimizing this s s residual that is y i minus beta naught minus beta 1 x i square i from 1 to n. So, this is the s s residual or so we minimize this quantity to we estimate beta naught and beta 1 in such a way that this is minimum that is what the ordinary least square technique is. Now, in the weighted least square we put a weight for the ith observation that is w i and here part c of that problem or part 3 of the problem it says that the weight is 1 by x x square that is 1 by x i square. So, w i is 1 by x i square which is equal to y i minus beta naught minus beta naught beta 1 x i square. So, this is the weighted least square function and this can be written as y i by x i minus beta naught x i minus beta 1 whole square. So, using the weighted least square technique we will estimate the parameter beta naught and beta 1 such that this is minimum this is what the weighted least square technique suggest. Now, the question says whether this is equivalent to the transformation introduced in the original in part 1. Now, in part 1 so this is the transformation we considered. So, here to compute beta naught and beta 1 we here you can see that epsilon dash is it is a constant variance. So, we can go for ordinary least square technique and the function will minimize is say call it S star beta 1 sorry beta naught beta 1. So, this is equal to this is equal to y i prime minus beta naught x i prime minus beta 1. So, we will minimize this to estimate beta naught and beta 1. Now, you can see that you know this one is equal to this one is nothing but y i by x i minus beta naught by x i minus beta 1. So, we are minimizing now we can see that this two here this is the least square function for the ordinary least square and this is the weighted least square function for the weighted least square. Now, you can see that both are same this one is same as this one. So, the function we are considering in the original in the transform model to estimate beta naught and beta 1 is the same as the function we are considering to estimate beta naught and beta 1 using weighted least square technique. So, answer to the problem part 3 is this equivalent the answer is yes it is equivalent. So, this is one problem we considered from the variance stabilizing transformations and next I will be considering one more problem this problem is from generalized linear model technique well. So, this problem says that suppose we have n observations of variables x 1, x 2, x k, y where x r regressor variable and y is a linear variable and y is a linear response variable. And the question is if y i's are Poisson variable with mean mu y what type of analysis is feasible. So, the objective of the generalized linear model topic was if the response variable is not following normal distribution, but if the response variable follows some distribution from the exponential family then how to fit a model for that. So, that was the objective of generalized linear model and here you can see that this response variable y follows Poisson distribution. So, Poisson distribution is a member of exponential family. So, we will see how to solve this problem. So, y follows Poisson with mean mu y and then we know that this probability mass function of y can be written as f y mu which is equal to exponential y l n mu we can check this minus mu minus l n y factorial. And here b theta or b mu I should write may be is l n mu which is the natural parameter which is the natural parameter. What we have learned in this topic called generalized linear model is that how to fit a model when the response variable is not normal. So, the variation in y i could be explained in terms of the regressors value. So, what model we fit that we fit the model some g mu i equal to x i prime beta. So, which is equal to beta 1 x i 1 plus beta 2 x i 2 plus say x i 1 plus beta k x i k and this g mu is the link function which is nothing but the natural parameter that is l n mu i. So, the model we go for is that l n mu i is equal to x i prime beta. So, this can be written as mu i is equal to e to the power of x i prime beta and which is nothing but expectation of y i. So, that is mu i which is equal to e to the power of x i prime beta. So, this is the model we need to fit if the response variable follow Poisson distribution and usually what we fit is that if the y follow normal distribution then we fit the model e y i is equal to x i prime beta. But if it is following Poisson then we fit this model and if y follows say binomial then depending on the natural parameter we get the model to be fitted. So, I have tried to you know cover problem from different topics. I have tried to consider in this course and that is all. So, we need to stop now. Thank you.


Good morning, beautiful friends, and welcome to a very unplanned episode. I'm not about to become a news channel, but I felt like this was very important to cover because it is happening right now here in my country of America.   I talked about the Sackler family, Purdue Pharma, and how they did really shady things that impacted the opioid crisis here and contributed to the death of hundreds of thousands of people. Rochester Drug Cooperative has done very, very shady things along the same lines, and its executives have had a direct hand in what it did. So for the first time in US history, they are facing criminal charges along with their company, which is very different from being sued, which is very different from civil charges, and the charges that they are facing are very serious. I'll talk about the company for two seconds, but then I want to focus on the people who are being charged in this as well. Rochester Drug Cooperative is being charged with defrauding the Drug Enforcement Agency and also failing to give, failing to provide information that was necessary. They have already agreed to a settlement paying many millions of dollars, I believe the number is 20, but let's talk about two of its ex-top executives, Lawrence Dowd and William Petroshevsky. They are also being criminally charged with similar charges. Lawrence Dowd, the former CEO, is in custody. Does anyone else watch John Oliver? And he always has like, he'll have like a big moment where he's like, we got him boys! And like, Betty will come down from the ceiling and everything like that. I feel like it's a moment like this where I'm like, we got him! He's in custody. I probably should not be so exuberant about this, but he personally directed and profited from what his company was doing, completely knowingly. Some of the charges that he is facing and he's expected in court later today, Tuesday, are conspiring to distribute fentanyl and oxy and conspiring to defraud the DEA. William Petroshevsky actually pled guilty to these charges on Friday and is cooperating. So what did they do that was so bad? Let's talk about Lawrence Dowd for instance. Rochester Drug Cooperative or RDC was required to report any kind of suspicious orders. Suspicious orders look like an order coming in from a pharmacy in all cash, customers traveling over state lines to fill prescriptions, large shifts in the order amounts from pharmacies. They were required to flag these and report them to the DEA. Jeff Berman, the U.S. Attorney for the Southern District of New York, came and spoke to the press about this today. RDC's internal compliance system flagged 8,300 orders from pharmacies as potentially suspicious. RDC reported just four suspicious orders to the DEA. Within their company they flagged 8,000 suspicious orders between 2013 and 2016. Now if I was a shady executive running a company or running a compliance division, I feel like 8,000 might be a little bit low because it's your own company checking these orders and saying whether they look suspicious or not, but 8,000 was the number that they found. Four of these were ever reported to the DEA. They were required to report all suspicious instances, but it was a very intentional direction not to report to keep selling to pharmacies that look suspicious to people that look suspicious. Also let's pause for just a second. Those graphics are fantastic. I know they had to like probably work them up really quickly, but I'm really glad for what they're doing. They are good at their job. Clipart is not their strong point. It's not my strong point either. Who am I to judge? I'm a terrible person. Moving on. Dowd was called the knight in shining armor for pharmacies that had been flagged and weren't allowed to sell prescription narcotics anymore because he would sell to them. Isn't that nice? From 2012 to 2016, their profits increased 800% from Oxy and 2,000% from fentanyl, and these were the years that the super very shady practices were in practice and that they were not reporting what they needed to report to the DEA. Dowd, Petroshevsky, and RDC consistently prioritized sales over compliance, and compliance is like such a boring word, I feel like, but when you think about what compliance actually means, when compliance means saying, hey, I think this pharmacy or this group might be selling drugs illegally when we're in the middle of an opioid crisis or epidemic and hundreds of thousands of people are dying, compliance suddenly sounds a little bit more important, which they were well aware of. The charges, I believe, span 2013-2017 when they shipped tens of millions of orders to places they should not have. I think this is a really important step forward because where companies have been made to pay money before, for instance, Purdue Pharma did pay a settlement for false advertising of Oxy as not as addictive as it was. I don't think money hurts enough when you're talking about the lives of so many people. I don't think just settling a case as an organization, as a company, is really satisfying, which is why I think it is really cool that people are individually being charged with heavy criminal charges this time, and hopefully something will come of it. I'm also going to link down below to articles that cover this topic and then we'll keep you more updated than I can. Like I said, don't worry, I'm not going to just start reporting a news to you all the time, but because I've covered this topic before and because I really care, like I really, really care about this, that it was important to talk about today because I think it's a really cool step forward. So that's what we did, let's cross our fingers that good things come of it and that more lives are saved in the future. Thank you for watching, guys, and spending a few minutes with me here today. I look forward to seeing you in my next video. I love you guys, I'm thinking about you, and I'll see you soon. Bye guys.


Hi and welcome to the session. I am Deepika here. Let's discuss the question. Move that the function I have given by fx is equal to x square minus x plus 1 is neither strictly increasing nor strictly decreasing on an open interval minus 1 to 1. So let's start the solution. Given fx is equal to x square minus x plus 1, therefore, f dash x is equal to 2x minus 1. Now, f dash x is equal to 0 implies x is equal to 1 by 2. Hence, x is equal to 1 by 2 divides the interval minus 1 to 1 into 2 disjoint intervals that is minus 1 to 1 by 2 and 1 by 2 to 1. Now for x less than 1 by 2, f dash x is less than 0. This implies f is strictly decreasing in minus 1 to 1 by 2. Now for x greater than 1 by 2, after x is greater than 0, this implies f is strictly increasing in 1 by 2 to 1. Now, f is strictly decreasing in the interval minus 1 to 1 by 2 and it is strictly increasing in the interval 1 by 2 to 1. So on the entire interval minus 1 to 1, it is neither strictly increasing nor strictly decreasing because f dash x does not have the same sign on an entire interval minus 1 to 1. Hence, f is neither strictly increasing nor strictly decreasing minus 1 to 1. Hence, proved. I hope the question is clear to you. Bye and take care.


Thank you Hello everybody I will try to Summarize a new part of the video library just called with the dbo in around 15 minutes. I will mostly show some code examples Since I think that the real benefit or the real added value of this Library is how you can concisely interface with the database from C++ code And I think the most important aspect there is just how Intuitive the code works so Why would we want to have an ORM for C++? Not only because there is one for every language Out there and really good a library is lacking for C++. So that would be one reason That doesn't make a lot of sense But the real reason is that we want to simplify our development and and have to keep in mind that using sequel I don't think it's very difficult sequel is a very simple language and So we should make sure that we don't complicate using sequel But what makes sequel a bit? Hard to use from a programming language is that you have to Didiously map every field from your relational tables on to members of your classes and you want to keep you want to have a way of traversing relationships in your relational database using concepts that you're familiar from or familiar with in C++ which is using pointers and collections so In order to keep it simple and to keep it very intuitive We decided that we would don't want to use any code generation because just code generation usually is a step Where you have very little control over so our library doesn't use any code generation? We also Don't have any XML mapping definitions. I think adding an extra XML file separate from your relational database schema and separate from your C++ code only complicates things So we also decided to avoid any macro hacks So the whole library doesn't have any Macro which tries to hide the C++ from you you get exposed to all the C++ that is there and Of course, we try to be concise because we want to actually Save you from typing and save you from making errors rather than making things more complicated So this whole Effort started in only in September last year so that's when we got the idea that this should be possible in C++ and We had a first release in December and it's already being used online in our Home page where we use a blog that is implemented using DBO and that blog already get slash dotted So and it survived it very well. So I think it's already been a bit tested as well so Going straight to the code. This is how you would map fields in DBO onto a table. So imagine that you have a an entity user which you where you want to store user information and in C++ you want to describe this user class using Using Tree fields, for example, there's a string where we keep the name. There is a role which is an enum and There is a some karma that we assign to every user And the only thing that DBO adds to your class definition and you can use public or private fields or whatever But just to keep all my examples simple I'm going to use public fields, but you can obviously you can hide them and use Accessors so the only thing that you have to add that is DBO specific to your class definition is a persist method which takes a class an action class as a template argument and In that persist method you will simply declare how you map particular information from your class on to fields in your database So once you've done that for a particular class you can use it even the database so currently so here. I'm going to use our SQLite backend, which is a back in the DBO which is basically the only backend we currently have and Everything in DBO will Happen within the scope of a session and I will later talk a bit about why that is the case So in our session we're going to assign it to this Backend connection and then here is the actual mapping statement So you just say I want to map the class user on to the table user so this Together with the information on the previous slides provides all the mapping information and then one thing that we could already do is ask the session to create the tables in our database and This will Execute some SQL that looks like this based on the information from your class. So this is just to a Complete example the previous class in declaration together with this Statements you don't need any other code generation or other tool no XML mapping no Build time information. This will just work so Obviously we do not only want to create a table, but we also want to see how we can use the interaction between our Database and our program.  So so this is a Transaction boundary and then here we simply create our new object So because we used public members regarding to just assign some information there and then here we're going to add our user to our session that we previously created and This statement will when we commit a transaction will insert the see will insert our user into the database and We are going to keep track of a user that is stored in the database using the special smart pointer class DBO pointer and This pointer class not only allows us to use it as a regular pointer But it also provides some meta information on our object that has been saved and for example one of this is the Database ID that was assigned to this object. So then we can keep track of that for other users Same thing for updating an object. So again, we're going to do this within a transaction So suppose that we have some DBO pointer that we accessed or that we retrieved or that we just saved from the database then we can just Inspect some property. So here we see the smart pointer use It behaves like a regular pointer to for reading information. However to modify information. We use the modify method which is available on our smart pointer to access a non writable copy of our object and So this modify operator will just mark that object is dirty and the next time you transmit Do you commit your transaction? It's going to flush this modifications to the database So this is again the sequel that will be generated. So in our sequel statements, you will see the typical sequel syntax for prepared statements. That's because all of our Generated sequel will use prepared statements and will use the real binding methods that are available in our in your database layer Same thing for queries. So again within a transaction This is how for example, you would find a single user with name Joe So from our session, we will use the find method which is templatized with the class of the objects that we want to retrieve and here we can specify the remaining part of the sequel query So everything after the select from part you can specify here and here we say where we want to have a name again, we use prepared statements and we will bind the parameter Joe to this first question mark Since we expect only one particular user that matches this query. We already Coerced the result into a DBO pointer If you had if this query would have resulted in many results You would it would throw an exception if there is no Joe With this that matches this criteria It will return a null DBO pointer, which just behaves like a normal null pointer Same thing for retrieving a collection. So here we start a result in a DBO collection and a DBO collection together with DBO point or the two main smart or the two classes in DBO that you will need to use to interact with Database objects So let's say that we find all the users with karma less than five so same thing we bind five to this positional parameter and We we retrieve the result in this DBO collection and this DBO collection really acts like an STL collection So we can use boost for each to iterate on all results and print some information on it So again, we commit our transaction In this case, this will not do really anything But the database mandates that you do everything within the scope of a transaction or actually or the DBO does that all right, so To give some more information on these two classes pointer and collection. So pointer is really a smart pointer class for objects and it facilitates a number of Features for our class. So an important thing of the smart pointer class is that it does memory management since in sequel you don't really have a good hierarchy of this objects has ownership of or this Table has ownership of records of this table. So this is not really part of sequel But this is how you would typically Implemented in C++ if you wouldn't use smart pointers With smart pointers, you don't have to bother about when a particular object should be deleted the date The the DBO will do that for you as soon as no references are no longer held in in your session So this memory management works in conjunction with the session object there is a right access using the Modified method which marks an object dirty and then there are several persistence method Methods available on the smart pointer. So you can explicitly flush a particular object You can remove the object which makes it transient again So the object is removed from the database, but your in-memory object can still be used And maybe you want to resave it later You can reread the latest database version from a particular object and we already saw how we could use the ID so same thing for a collection collection is an STL like container for query results and It's iterators implemented the lowest form of requirements for an STL iterator, which is an input iterator So the more interesting part or the actual more useful part of DBO is how you can map relations and Here we show how you can map a many to one relation. So Suppose that we want to allow our user to alter posts for example in a blog and most Most examples are about blocks these days. So this is not exception So what we do in our class user we're going to add a DBO collection of DBO pointers to posts and in our persistence method we will say that a user has many posts and are many posts so posts many to one user and user will be the field that corresponds to this User and so in class post we're simply going to say so a post is owned by a user here again We use the DBO pointer to just have a reference to the user and then in our persistence method We will state that this post belongs to a particular user user So obviously this string and this string has to match and that's how the library knows that they are At the two ends of the relation But other than that, there's nothing special about this. So after you've done this you can just assign values to the user you can inspect the user you can iterate through all the posts that that belong to a user and The database or the DBO layer will generate the necessary sequel to manipulate and to interact with these two Fields in your classes So this is almost the same. So it's even if you look at the effect. It's quite nice. So you can I can skip most of the Information because it's actually the same to do a many to many relationship. However here obviously this is going to be symmetrical so here instead of a Point to we also have a collection So now we will say that a post can have many tags and tags can be reused over posts So we have just a collection of tags We have just a collection of posts and he will say that a post has many tags and there are many too many tags To a post and then this particular field now has the meaning of the name of the joint table that we're going to use in Our database to connect these two information. So here you see exactly the same So how does this work? all of the magic really happens within this persist method and The library will Define several actions at the moment are nine to ten actions defined by the library and each action is responsible for a particular Action so there is One action that is responsible to load an event. There is one for saving an object is one to examine the transaction come out outcome and so on and so The DBO layer will visit your objects using this persist method and it will pass the right action That is applicable to what it wants to achieve. There are also traits classes specialized specialized for field types and We will avoid any loops of pointer objects in relations and this is how our shared pointer Memory management will work So there are some other features which I will briefly list So we already I already told you that we were using prepare statements throughout queries can also be More complex than the ones that we showed you can have composite results and it works together with a boost tuple to Result to start the results in currently only have a SQLite back end and I Welcome any questions about that There's built in There's built in an optimistic locking scheme for concurrency It's you a licensed and it's part of witty and If you want to see more information or a more extended tutorial, I recommend to just google for it on the or go to this URL on our website Thank you in minutes


hey everyone welcome to figure fantasy again we're going to be looking at tia's um evaluation and rating and let's take a look at how she does a lot of hype has been developed around tia um i've covered her quite a while discussed her kit for quite a while already and uh let's go back to what makes her good so definitely you guys know that she's good already but again let's do a recap of how good she is so um tia gives various buffs to allies during secret technique probability of the secret technique power increases in the case of pegasus energy and h recovery damage reduction increases durability so she is a defender a tank with a lot of buffs to herself okay so she's gonna be very good uh addition for tenma um eventually we're gonna be replacing crucius with her so let's check her out so attack skill is going to be range one attack speed is fast prioritize the attacking foremost and it's the usual um level up effect uh it's going to be a plus 50 percent her technique skill or her ultimate initial energy is zero this might have been no wrong in the encoding but her skill is attack the current target dealing heavy damage level up effect increases the mystery or the ultimate damage by 36 gives a protective effect to allied figures in the start of the battle where or when the mystery is activated so activation of ultimate and also uh the start of the battle she is going to be uh giving a protective effect to all allied figures and reduces the next damage received by 50 so that's a lot and it's not a self buff actually it's a buff to all allies the damage reduction is huge by 50 so level up the other one is when an ally when i tell my ally figure activates a secret technique or their ultimate there is a 50 chance that she has secret technique power will increase by 30 it's not bad stacking up to three times disappears when the mystery is activated or her ultimate again this this ultimate alone is good it's a very good protective buff it has a lot is damage reduction it has protective effects and it revolves around it revolves towards her um technique will increase 30 so the secret technique i think this is going to be her ultimate so it revolves around her ultimate basically so passive is at the start of the battle um tia will be in a strengthened state and when an ally figure activates a secret technique it will recover and acquire 25 energy so for every time your allies do an ultimate she there's a possibility that she's she will recover she it will recover and acquire 25 energy so this is not conditional this is going to happen whenever your allies do a ultimate so recovers energy also reduces damage taken by 16 for five for five seconds stacking up to 14 times so 16 times four that's roughly what 64 so that's big that's big level of effect in in ambition of behavior is disabled treatment effect is increased by 28 gain two damage reduction at the start of combat so specialized skills so 25 chance to reduce damage taken by 50 percent when attacked degrees on critical damage and defense by 10 and 35 chance to reduce damage taken by 50 percent when attacked again she has a lot of damage reduction she has buffs protective buffs for her team what can you ask for in a defender she's top tier she's she's she's s tier guys you have to summon for her there's no other way there's no other excuse that you can't summon for her again she's going to check all boxes she's rated a 9.7 out of a 10 uh you'll regret it if you don't summon for her so please make sure that you do summon for this android she's she's actually an android so again a lot of things going for her as a defender probably one of our top defenders when she comes out and this is who she loves to work with vivian irhans uh mako zephyr and sani and also for her skin so she has this skin uh i've seen this before and she has the this one this is a new one so this is i think an mvp skin so that is it guys again she's a must summon i tell you she needs to be on your roster as soon as possible as soon as this figure drops you need to have her you need to level her up you need to get her to five diamonds if possible so again guys what can i say so thank you very much for staying this far i will put a link for this um this uh website that i've referenced in the description so take care stay safe this is the warden and i'm out of here